增加查询条件

tags/yfai-mes-ext-v1.0
LML丶 1 year ago
parent 5578becfaa
commit d902071563

@ -12,4 +12,6 @@ import org.springframework.web.bind.annotation.RestController;
@RequestMapping(MesCommonConstant.MES_YANFEN + "/mesShippingOrderManagement")
public class MesShippingOrderManagementController extends BaseMesController<MesShippingOrderManagement> {
}

@ -3,9 +3,11 @@ package cn.estsh.i3plus.ext.mes.apiservice.controller.base;
import cn.estsh.i3plus.ext.mes.pojo.constant.MesCommonConstant;
import cn.estsh.i3plus.pojo.mes.bean.MesShippingOrderManagement;
import cn.estsh.i3plus.pojo.mes.bean.MesShippingOrderManagementDetail;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Api("发运单管理明细")
@RestController
@RequestMapping(MesCommonConstant.MES_YANFEN + "/mesShippingOrderManagementDetail")

@ -43,7 +43,7 @@ public class MesShippingOrderManagementService extends BaseMesService<MesShippin
@Override
public MesShippingOrderManagement insert(MesShippingOrderManagement bean) {
//插入前构造数据
//插入前构造并校验数据
onInsertBean(bean);
//查询物料发运组数据
@ -81,7 +81,7 @@ public class MesShippingOrderManagementService extends BaseMesService<MesShippin
@Override
public MesShippingOrderManagement update(MesShippingOrderManagement bean) {
//更新前构造数据
//更新前构造并校验数据
onUpdateBean(bean);
MesShippingOrderManagement originBean = baseRDao.getById(bean.getId());
if (StringUtils.isEmpty(originBean)) {
@ -168,6 +168,19 @@ public class MesShippingOrderManagementService extends BaseMesService<MesShippin
ValidatorBean.checkNotNull(item.getCustomerOrganizeCode(), "客户工厂代码不能为空");
ValidatorBean.checkNotNull(item.getShippingGroupNo(), "发运组代码不能为空");
ValidatorBean.checkNotNull(item.getStatus(), "状态不能为空");
DdlPackBean shipGroupPackBean = DdlPackBean.getDdlPackBean(item.getOrganizeCode());
DdlPreparedPack.getStringEqualPack(item.getShippingOrderNo(), "shippingOrderNo", shipGroupPackBean);
boolean flg = baseRDao.isExitByHql(shipGroupPackBean);
if (flg) {
throw ImppExceptionBuilder.newInstance()
.setSystemID(CommonEnumUtil.SOFT_TYPE.MES.getCode())
.setErrorCode(ImppExceptionEnum.VARIFY_EXCEPTION.getCode())
.setErrorDetail("【%s】发运单已经存在请检查数据", item.getShippingOrderNo())
.build();
}
}
protected void onUpdateBean(MesShippingOrderManagement item) {

@ -61,7 +61,8 @@ public class MesExtEnumUtil {
public static enum ORDER_TYPE_IDENTIFICATION {
S(10, "S"),
P(20, "P"),
E(30, "E");
N(30, "N"),
E(40, "E");
private int value;
private String description;
@ -93,18 +94,18 @@ public class MesExtEnumUtil {
}
/**
*
*
*/
@JsonFormat(
shape = JsonFormat.Shape.OBJECT
)
public static enum ORDER_STATUS {
CREATE(10, "已创建"),
CREATE(10, "未处理"),
RELEASE(20, "已发布"),
process(30, "在加工"),
CLOSE(40, "关闭"),
CLOSE(40, "关闭"),
COMPLETE(50, "已完成"),
CANCEL(60, "已取消"),
SHIPPING(60, "已发运"),
DISMANTLE(70, "已拆解");
private int value;
@ -1207,6 +1208,45 @@ public class MesExtEnumUtil {
return this.description;
}
}
/**
* -
*/
@JsonFormat(
shape = JsonFormat.Shape.OBJECT
)
public static enum DEFECT_CATEGORY {
POSITION(10, "位置"),
TYPE(20, "类型"),
RESPONSIBILITY(30, "责任");
private int value;
private String description;
private DEFECT_CATEGORY(int value, String description) {
this.value = value;
this.description = description;
}
public static String valueOfDescription(int val) {
String tmp = null;
for (int i = 0; i < values().length; ++i) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
public int getValue() {
return this.value;
}
public String getDescription() {
return this.description;
}
}
}

Loading…
Cancel
Save