forked from I3-YF/i3plus-mes-pcn-yfai
电子化检验-转正常不需要责任人
parent
c2088d7828
commit
b049a2097a
@ -0,0 +1,17 @@
|
|||||||
|
package cn.estsh.i3plus.ext.mes.pcn.api.base;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.estsh.i3plus.pojo.mes.bean.MesOrg;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 责任人库区关系
|
||||||
|
* @Author: gsz
|
||||||
|
* @Date: 2024/5/25 18:16
|
||||||
|
* @Modify:
|
||||||
|
*/
|
||||||
|
public interface IMesOrgService {
|
||||||
|
|
||||||
|
List<MesOrg> queryMesOrg(MesOrg mesOrg);
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
package cn.estsh.i3plus.ext.mes.pcn.apiservice.controller.busi;
|
||||||
|
|
||||||
|
import cn.estsh.i3plus.ext.mes.pcn.api.base.IMesOrgService;
|
||||||
|
import cn.estsh.i3plus.ext.mes.pcn.pojo.constant.MesCommonConstant;
|
||||||
|
import cn.estsh.i3plus.pojo.base.enumutil.ResourceEnumUtil;
|
||||||
|
import cn.estsh.i3plus.pojo.mes.bean.MesOrg;
|
||||||
|
import cn.estsh.impp.framework.boot.exception.ImppBusiException;
|
||||||
|
import cn.estsh.impp.framework.boot.util.ResultBean;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 责任人库区关系
|
||||||
|
* @Author: gsz
|
||||||
|
* @Date: 2024/6/5 10:16
|
||||||
|
* @Modify:
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping(MesCommonConstant.MES_YANFEN + "/mesOrg")
|
||||||
|
public class MesOrgController {
|
||||||
|
@Autowired
|
||||||
|
private IMesOrgService mesOrgService;
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping(value = "/query")
|
||||||
|
@ApiOperation(value = "查询责任人区域关系")
|
||||||
|
public ResultBean queryMesProdShiftRecord(MesOrg mesOrg) {
|
||||||
|
try {
|
||||||
|
|
||||||
|
List<MesOrg> mesOrgList= mesOrgService.queryMesOrg(mesOrg);
|
||||||
|
return ResultBean.success("查询成功")
|
||||||
|
.setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode()).setResultList(mesOrgList);
|
||||||
|
} catch (ImppBusiException e) {
|
||||||
|
return ResultBean.fail(e).build();
|
||||||
|
} catch (Exception e) {
|
||||||
|
return ResultBean.fail(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
package cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.base;
|
||||||
|
|
||||||
|
import cn.estsh.i3plus.ext.mes.pcn.api.base.IMesOrgService;
|
||||||
|
import cn.estsh.i3plus.pojo.base.bean.DdlPackBean;
|
||||||
|
import cn.estsh.i3plus.pojo.base.tool.DdlPreparedPack;
|
||||||
|
import cn.estsh.i3plus.pojo.base.util.StringUtil;
|
||||||
|
import cn.estsh.i3plus.pojo.mes.bean.MesOrg;
|
||||||
|
import cn.estsh.i3plus.pojo.mes.repository.MesOrgRepository;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 责任人区域关系
|
||||||
|
* @Author: gsz
|
||||||
|
* @Date: 2024/6/5 10:16
|
||||||
|
* @Modify:
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
@Slf4j
|
||||||
|
public class MesOrgServiceImpl implements IMesOrgService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private MesOrgRepository mesOrgRDao;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<MesOrg> queryMesOrg(MesOrg bean) {
|
||||||
|
DdlPackBean packBean = DdlPackBean.getDdlPackBean(bean.getOrganizeCode());
|
||||||
|
DdlPreparedPack.getStringEqualPack(bean.getInventoryLocationCode(), "inventoryLocationCode", packBean);
|
||||||
|
if(StringUtil.isEmpty(bean.getResponsibleParty())){
|
||||||
|
DdlPreparedPack.getIsNotNull( "responsibleParty", packBean);
|
||||||
|
}else {
|
||||||
|
DdlPreparedPack.getStringEqualPack(bean.getResponsibleParty(), "responsibleParty", packBean);
|
||||||
|
}
|
||||||
|
packBean.setOrderByStr(bean.orderBy());
|
||||||
|
|
||||||
|
return mesOrgRDao.findByHqlWhere(packBean);
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue