|  |  |  | 
|---|
|  |  |  | import com.core.exception.CoolException; | 
|---|
|  |  |  | import com.zy.asrs.entity.Mat; | 
|---|
|  |  |  | import com.zy.asrs.entity.WrkDetl; | 
|---|
|  |  |  | import com.zy.asrs.entity.param.PickInParam; | 
|---|
|  |  |  | import com.zy.asrs.mapper.WrkDetlMapper; | 
|---|
|  |  |  | import com.zy.asrs.service.MatService; | 
|---|
|  |  |  | import com.zy.asrs.service.WrkDetlService; | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private MatService matService; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private WrkDetlService wrkDetlService; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private WrkDetlMapper wrkDetlMapper; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | @Transactional | 
|---|
|  |  |  | public void createWorkDetail(Integer workNo, List<DetlDto> detlDtos, String barcode, Long userId) { | 
|---|
|  |  |  | public void createWorkDetail(Integer workNo, List<DetlDto> detlDtos, String barcode, Long userId, Date now) { | 
|---|
|  |  |  | if (detlDtos.isEmpty()){ | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | Date now = new Date(); | 
|---|
|  |  |  | for (DetlDto dto : detlDtos) { | 
|---|
|  |  |  | Mat mat = matService.selectByMatnr(dto.getMatnr()); | 
|---|
|  |  |  | if (Cools.isEmpty(mat)){ | 
|---|
|  |  |  | 
|---|
|  |  |  | return baseMapper.updateAnfme(anfme, wrkNo, matnr, batch) > 0; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public List<WrkDetl> selectByOrderNo(String orderNo) { | 
|---|
|  |  |  | return this.baseMapper.selectByOrderNo(orderNo); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public List<WrkDetl> selectAndLogByOrderNo(String orderNo) { | 
|---|
|  |  |  | return this.baseMapper.selectAndLogByOrderNo(orderNo); | 
|---|
|  |  |  | 
|---|
|  |  |  | public boolean updateInspect(Integer wrkNo, String matnr, String batch) { | 
|---|
|  |  |  | return this.baseMapper.updateInspect(wrkNo, matnr, batch) > 0; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public List<WrkDetl> selectPakoutQuery(Integer staNo, String matnr) { | 
|---|
|  |  |  | return this.baseMapper.selectPakoutQuery(staNo, matnr); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public List<WrkDetl> selectAndLogByOrderNoGroupByMatnrOfSum(String orderNo) { | 
|---|
|  |  |  | return this.baseMapper.selectAndLogByOrderNoGroupByMatnrOfSum(orderNo); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public boolean updateIoTimeWms(Integer workNo, Date ioTime) { | 
|---|
|  |  |  | return this.baseMapper.updateIoTimeWms(workNo, ioTime) > 0; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public List<PickInParam> selectDetByBarcode(String barcode){ | 
|---|
|  |  |  | return this.baseMapper.selectDetByBarcode(barcode); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|