forked from I3-YF/i3plus-mes-yfai
成都发运,临时提交
parent
c99e80085d
commit
d417f0aa7b
@ -0,0 +1,15 @@
|
||||
package cn.estsh.i3plus.ext.mes.api.base;
|
||||
|
||||
|
||||
import cn.estsh.i3plus.pojo.mes.bean.MesAssemblyNosortCfg;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.MesVolvoRack;
|
||||
|
||||
/**
|
||||
* @Description:
|
||||
* @CreateDate 2024/04/16
|
||||
* @Author zxw
|
||||
*/
|
||||
public interface IMesVolvoRackService extends IBaseMesService<MesVolvoRack> {
|
||||
|
||||
|
||||
}
|
@ -1,16 +1,57 @@
|
||||
package cn.estsh.i3plus.ext.mes.apiservice.controller.base;
|
||||
|
||||
import cn.estsh.i3plus.ext.mes.api.base.IMesLoadingListService;
|
||||
import cn.estsh.i3plus.ext.mes.pojo.constant.MesCommonConstant;
|
||||
import cn.estsh.i3plus.pojo.base.bean.ListPager;
|
||||
import cn.estsh.i3plus.pojo.base.common.Pager;
|
||||
import cn.estsh.i3plus.pojo.base.enumutil.ResourceEnumUtil;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.MesPartPtrDetail;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.shipping.MesLoadingList;
|
||||
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 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;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Api(description = "装车单主页面")
|
||||
@RestController
|
||||
@RequestMapping(MesCommonConstant.MES_YANFEN + "/mesLoadingVehiclesOrder")
|
||||
|
||||
public class MesLoadingListController extends BaseMesController<MesLoadingList> {
|
||||
|
||||
@Autowired
|
||||
private IMesLoadingListService mesLoadingListService;
|
||||
|
||||
@PostMapping(value = "/submit")
|
||||
@ApiOperation(value = "确认")
|
||||
public ResultBean submit(@RequestBody List<Long> ids) {
|
||||
try {
|
||||
mesLoadingListService.submit(ids);
|
||||
return ResultBean.success("确认成功").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
|
||||
} catch (ImppBusiException busExcep) {
|
||||
return ResultBean.fail(busExcep);
|
||||
} catch (Exception e) {
|
||||
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value = "/createVolvoAsn")
|
||||
@ApiOperation(value = "创建沃尔沃的ASN")
|
||||
public ResultBean createVolvoAsn(@RequestBody List<Long> ids) {
|
||||
try {
|
||||
mesLoadingListService.createVolvoAsn(ids);
|
||||
return ResultBean.success("确认成功").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
|
||||
} catch (ImppBusiException busExcep) {
|
||||
return ResultBean.fail(busExcep);
|
||||
} catch (Exception e) {
|
||||
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,14 @@
|
||||
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.MesVolvoRack;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* volvo 料架
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping(MesCommonConstant.MES_YANFEN + "/mesVolvoRack")
|
||||
public class MesVolvoRackController extends BaseMesController<MesVolvoRack>{
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
package cn.estsh.i3plus.ext.mes.apiservice.serviceimpl.base;
|
||||
|
||||
import cn.estsh.i3plus.ext.mes.api.base.IMesAssemblyNosortCfgService;
|
||||
import cn.estsh.i3plus.ext.mes.api.base.IMesVolvoRackService;
|
||||
import cn.estsh.i3plus.ext.mes.apiservice.serviceimpl.base.BaseMesService;
|
||||
import cn.estsh.i3plus.ext.mes.apiservice.utils.MesException;
|
||||
import cn.estsh.i3plus.pojo.base.bean.DdlPackBean;
|
||||
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
|
||||
import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.MesAssemblyNosortCfg;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.MesVolvoRack;
|
||||
import cn.estsh.i3plus.pojo.mes.bean.MesWcEquipment;
|
||||
import cn.estsh.impp.framework.boot.util.ValidatorBean;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
public class MesVolvoRackService extends BaseMesService<MesVolvoRack> implements IMesVolvoRackService {
|
||||
|
||||
@Override
|
||||
protected void setPackQueryBean(MesVolvoRack bean, DdlPackBean packBean) {
|
||||
DdlPreparedPack.getStringLikerPack(bean.getRackOwner(), "rackOwner", packBean);
|
||||
DdlPreparedPack.getNumEqualPack(bean.getRackType(), "rackType", packBean);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onInsertBean(MesVolvoRack item) {
|
||||
// 数据校验
|
||||
ValidatorBean.checkNotNull(item.getRackOwner(), "料架所有者");
|
||||
ValidatorBean.checkNotNull(item.getRackSeq(), "料架系列号不能为空");
|
||||
ValidatorBean.checkNotNull(item.getRackType(), "料架类型不能为空");
|
||||
ValidatorBean.checkNotNull(item.getPositionTotal(), "位置总数不能为空");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onUpdateBean(MesVolvoRack item) {
|
||||
// 数据校验
|
||||
ValidatorBean.checkNotNull(item.getRackOwner(), "料架所有者");
|
||||
ValidatorBean.checkNotNull(item.getRackSeq(), "料架系列号不能为空");
|
||||
ValidatorBean.checkNotNull(item.getRackType(), "料架类型不能为空");
|
||||
ValidatorBean.checkNotNull(item.getPositionTotal(), "位置总数不能为空");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void validateImport(List<MesVolvoRack> beanList) {
|
||||
|
||||
for (MesVolvoRack item : beanList) {
|
||||
// 数据校验
|
||||
ValidatorBean.checkNotNull(item.getRackOwner(), "料架所有者");
|
||||
ValidatorBean.checkNotNull(item.getRackSeq(), "料架系列号不能为空");
|
||||
ValidatorBean.checkNotNull(item.getRackType(), "料架类型不能为空");
|
||||
ValidatorBean.checkNotNull(item.getPositionTotal(), "位置总数不能为空");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue