|
|
|
@ -1,9 +1,19 @@
|
|
|
|
|
package cn.estsh.i3plus.ext.mes.apiservice.controller.busi;
|
|
|
|
|
|
|
|
|
|
import cn.estsh.i3plus.ext.mes.api.busi.IMesSpotCheckOrderService;
|
|
|
|
|
import cn.estsh.i3plus.ext.mes.apiservice.controller.base.BaseMesController;
|
|
|
|
|
import cn.estsh.i3plus.ext.mes.pojo.constant.MesCommonConstant;
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.enumutil.ResourceEnumUtil;
|
|
|
|
|
import cn.estsh.i3plus.pojo.mes.bean.MesSpotCheckOrder;
|
|
|
|
|
import cn.estsh.impp.framework.boot.exception.ImppBusiException;
|
|
|
|
|
import cn.estsh.impp.framework.boot.exception.ImppExceptionBuilder;
|
|
|
|
|
import cn.estsh.impp.framework.boot.util.ResultBean;
|
|
|
|
|
import cn.estsh.impp.framework.boot.util.ValidatorBean;
|
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
|
@ -13,4 +23,29 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
@RequestMapping(MesCommonConstant.MES_YANFEN + "/mesSpotCheckOrder")
|
|
|
|
|
public class MesSpotCheckOrderController extends BaseMesController<MesSpotCheckOrder> {
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private IMesSpotCheckOrderService mesSpotCheckOrderService;
|
|
|
|
|
|
|
|
|
|
@PostMapping(value = "/qc-print")
|
|
|
|
|
@ApiOperation(value = "点检单结果打印")
|
|
|
|
|
public ResultBean queryMesSpotCheckOrderResultPrint(@RequestBody MesSpotCheckOrder mesSpotCheckOrder) {
|
|
|
|
|
try {
|
|
|
|
|
if (mesSpotCheckOrder == null) {
|
|
|
|
|
return ResultBean.success();
|
|
|
|
|
}
|
|
|
|
|
//条件验证
|
|
|
|
|
ValidatorBean.beginValid(mesSpotCheckOrder)
|
|
|
|
|
.notNull("spotCheckId", mesSpotCheckOrder.getSpotCheckId())
|
|
|
|
|
.notNull("spotCheckOrderNo", mesSpotCheckOrder.getSpotCheckOrderNo())
|
|
|
|
|
.notNull("organizeCode", mesSpotCheckOrder.getOrganizeCode());
|
|
|
|
|
|
|
|
|
|
return ResultBean.success("点检单结果打印成功")
|
|
|
|
|
.setResultObject(mesSpotCheckOrderService.queryMesSpotCheckOrderResultPrint(mesSpotCheckOrder))
|
|
|
|
|
.setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
|
|
|
|
|
} catch (ImppBusiException imppException) {
|
|
|
|
|
return ResultBean.fail(imppException);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|