| | |
| | | import com.ld.igds.inout.InoutConstant; |
| | | import com.ld.igds.inout.dto.InoutData; |
| | | import com.ld.igds.inout.dto.InoutParam; |
| | | import com.ld.igds.inout.dto.InoutCheckData; |
| | | import com.ld.igds.inout.dto.InoutCheckParam; |
| | | import com.ld.igds.inout.mapper.InoutCheckMapper; |
| | | import com.ld.igds.inout.mapper.InoutRecordMapper; |
| | | import com.ld.igds.inout.service.InoutService; |
| | | import com.ld.igds.io.constant.OrderRespEnum; |
| | |
| | | |
| | | @Resource |
| | | private InoutRecordMapper inoutMapper; |
| | | @Resource |
| | | private InoutCheckMapper inoutCheckMapper; |
| | | @Resource |
| | | private RedisUtil redisUtil; |
| | | @Resource |
| | |
| | | public String buildInoutKey(String deptId, String key, String type, String bizId) { |
| | | return Constant.APP_NAME + ":" + deptId + ":" + key + ":" + type + ":" + bizId; |
| | | } |
| | | |
| | | @Override |
| | | public Page<InoutCheckData> pageSampleData(InoutCheckParam param) { |
| | | |
| | | //设置起始和截止时间 |
| | | if (null != param.getStart()) { |
| | | param.setStart(DateUtil.getCurZero(param.getStart())); |
| | | } |
| | | if (null != param.getEnd()) { |
| | | param.setEnd(DateUtil.getNextZero(param.getEnd())); |
| | | } |
| | | |
| | | // 设置车牌和检验单据的模糊查询 |
| | | if (StringUtils.isNotEmpty(param.getPlateNum())) { |
| | | param.setPlateNum("%" + param.getPlateNum() + "%"); |
| | | } |
| | | if (StringUtils.isNotEmpty(param.getCheckId())) { |
| | | param.setCheckId("%" + param.getCheckId() + "%"); |
| | | } |
| | | |
| | | Page<InoutCheckData> page = new Page<>(param.getPage(), param.getLimit()); |
| | | page.setSearchCount(true); |
| | | |
| | | List<InoutCheckData> records = inoutCheckMapper.pageSampleData(page, param); |
| | | page.setRecords(records); |
| | | |
| | | return page; |
| | | } |
| | | |
| | | @Override |
| | | public String updateSampleData(InoutData data) { |
| | | if (StringUtils.isEmpty(data.getCompanyId())) { |
| | | data.setCompanyId(ContextUtil.getCompanyId()); |
| | | } |
| | | if (StringUtils.isEmpty(data.getDeptId())) { |
| | | data.setCompanyId(ContextUtil.subDeptId(null)); |
| | | } |
| | | |
| | | int num = inoutCheckMapper.updateSampleData(data); |
| | | return null; |
| | | } |
| | | |
| | | } |