Compare commits
No commits in common. "7aa7e382a8c461f1f66afd9d68c925431370fb00" and "4fd5498f1ec41d4a3c5aeda2fa3752227f6f60b7" have entirely different histories.
7aa7e382a8
...
4fd5498f1e
@ -11,7 +11,6 @@ import com.cnbm.common.validator.group.AddGroup;
|
||||
import com.cnbm.common.validator.group.DefaultGroup;
|
||||
import com.cnbm.common.validator.group.UpdateGroup;
|
||||
import com.cnbm.packing.dto.ChangePackagingBoxHistoryDTO;
|
||||
import com.cnbm.packing.entity.ChangePackagingBoxHistory;
|
||||
import com.cnbm.packing.excel.ChangePackagingBoxHistoryExcel;
|
||||
import com.cnbm.packing.service.ChangePackagingBoxHistoryServiceBiz;
|
||||
import io.swagger.annotations.Api;
|
||||
@ -118,7 +117,7 @@ public class ChangePackagingBoxHistoryController {
|
||||
})
|
||||
@PreAuthorize("@ex.hasAuthority('packing:changePackagingBoxHistory:export')")
|
||||
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
|
||||
List<ChangePackagingBoxHistory> list = changePackagingBoxHistoryService.historyList(params);
|
||||
List<ChangePackagingBoxHistoryDTO> list = changePackagingBoxHistoryService.list(params);
|
||||
if(list.size()>0) {
|
||||
ExcelUtils.exportExcelToTarget(response, "包装箱模组操作记录", list, ChangePackagingBoxHistoryExcel.class);
|
||||
}
|
||||
|
@ -159,13 +159,4 @@ public class WoPackagingBoxController {
|
||||
return woPackagingBoxService.boxList(woSubstrateId);
|
||||
}
|
||||
|
||||
@PostMapping("insertSubstrateManual")
|
||||
@ApiOperation("手动新增包装箱")
|
||||
@LogOperation("手动新增包装箱")
|
||||
public IdVo insertSubstrateManual(@RequestBody WoPackagingBoxDTO dto){
|
||||
|
||||
return woPackagingBoxService.insertSubstrateManual(dto);
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -277,14 +277,4 @@ public class WoPackagingBoxSubstrateController {
|
||||
return new Result();
|
||||
}
|
||||
|
||||
@PostMapping("updateSubstrateManual")
|
||||
@ApiOperation("手动装箱编辑")
|
||||
@LogOperation("手动装箱编辑")
|
||||
public Result updateSubstrateManual(@RequestBody ChangePackingBoxDTO[] dtos){
|
||||
|
||||
woPackagingBoxSubstrateService.updateSubstrateManual(dtos);
|
||||
|
||||
return new Result();
|
||||
}
|
||||
|
||||
}
|
@ -28,6 +28,4 @@ public interface ChangePackagingBoxHistoryServiceBiz extends CrudService<ChangeP
|
||||
|
||||
List<ChangePackagingBoxHistoryDTO> list(Map<String, Object> params);
|
||||
|
||||
List<ChangePackagingBoxHistory> historyList(Map<String, Object> params);
|
||||
|
||||
}
|
@ -40,8 +40,6 @@ public interface WoPackagingBoxServiceBiz extends CrudService<WoPackagingBox, Wo
|
||||
|
||||
List<WoPackagingBox> boxList (String woSubstrateId);
|
||||
|
||||
IdVo insertSubstrateManual(WoPackagingBoxDTO dto);
|
||||
|
||||
|
||||
int updateIsArrivedByBoxNo(Integer isArrived, String boxNo);
|
||||
|
||||
|
@ -34,8 +34,6 @@ public interface WoPackagingBoxSubstrateServiceBiz extends CrudService<WoPackagi
|
||||
|
||||
void insertSubstrateManual(ChangePackingBoxDTO[] dtos);
|
||||
|
||||
void updateSubstrateManual(ChangePackingBoxDTO[] dtos);
|
||||
|
||||
WoPackagingBoxSubstrate getBySubId(String subId);
|
||||
|
||||
|
||||
|
@ -48,9 +48,6 @@ public class ChangePackagingBoxHistoryServiceBizImpl extends CrudServiceImpl<Cha
|
||||
Integer type = Integer.parseInt( params.get("type").toString());
|
||||
wrapper.eq(ObjectUtils.isNotNull(type), ChangePackagingBoxHistory.TYPE, type);
|
||||
}
|
||||
if(params.get("startTime")==null && params.get("endTime")==null && params.get("type")==null){
|
||||
wrapper.apply(true, "TO_DAYS(NOW())-TO_DAYS(create_time) = 0");
|
||||
}
|
||||
|
||||
return wrapper;
|
||||
}
|
||||
@ -58,8 +55,8 @@ public class ChangePackagingBoxHistoryServiceBizImpl extends CrudServiceImpl<Cha
|
||||
@Override
|
||||
public PageData<ChangePackagingBoxHistoryDTO> page (Map<String, Object> params){
|
||||
IPage<ChangePackagingBoxHistory> page = baseDao.selectPage(
|
||||
getPage(params, ChangePackagingBoxHistory.CREATE_TIME, true),
|
||||
getWrapper(params)
|
||||
getPage(params, ChangePackagingBoxHistory.CREATE_TIME, true),
|
||||
getWrapper(params)
|
||||
);
|
||||
return getPageData(page, ChangePackagingBoxHistoryDTO.class);
|
||||
}
|
||||
@ -100,12 +97,4 @@ public class ChangePackagingBoxHistoryServiceBizImpl extends CrudServiceImpl<Cha
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public List<ChangePackagingBoxHistory> historyList(Map<String, Object> params) {
|
||||
QueryWrapper<ChangePackagingBoxHistory> wrapper = getWrapper(params);
|
||||
List<ChangePackagingBoxHistory> historyList = mapper.selectList(wrapper);
|
||||
return historyList;
|
||||
}
|
||||
|
||||
}
|
@ -16,7 +16,6 @@ import com.cnbm.packing.mapper.WoPackagingBoxMapper;
|
||||
import com.cnbm.packing.mapper.WoPackagingBoxSubstrateMapper;
|
||||
import com.cnbm.packing.param.PowerReportQueryParam;
|
||||
import com.cnbm.packing.service.WoPackagingBoxServiceBiz;
|
||||
import com.cnbm.packing.service.WoPackagingBoxSubstrateServiceBiz;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -42,8 +41,6 @@ public class WoPackagingBoxServiceBizImpl extends CrudServiceImpl<WoPackagingBox
|
||||
private WoPackagingBoxMapper mapper;
|
||||
@Autowired
|
||||
private WoPackagingBoxSubstrateMapper substrateMapper;
|
||||
@Autowired
|
||||
private WoPackagingBoxSubstrateServiceBiz woPackagingBoxSubstrateServiceBiz;
|
||||
|
||||
|
||||
@Override
|
||||
@ -71,9 +68,6 @@ public class WoPackagingBoxServiceBizImpl extends CrudServiceImpl<WoPackagingBox
|
||||
Integer model = Integer.parseInt(params.get("model").toString());
|
||||
wrapper.eq(ObjectUtils.isNotNull(model), WoPackagingBox.MODEL, model);
|
||||
}
|
||||
if(params.get("startTime")==null && params.get("endTime")==null && params.get("boxNo")==null && params.get("lineBody")==null && params.get("printStatus")==null){
|
||||
wrapper.apply(true, "TO_DAYS(NOW())-TO_DAYS(create_time) = 0");
|
||||
}
|
||||
|
||||
return wrapper;
|
||||
}
|
||||
@ -159,31 +153,13 @@ public class WoPackagingBoxServiceBizImpl extends CrudServiceImpl<WoPackagingBox
|
||||
List<WoPackagingBox> boxList = new ArrayList<>();
|
||||
for(WoPackagingBoxSubstrate substrate: substrateList){
|
||||
QueryWrapper<WoPackagingBox> boxQueryWrapper = new QueryWrapper<>();
|
||||
boxQueryWrapper.like(StringUtils.isNotBlank(substrate.getPackagingBoxId()), WoPackagingBox.BOX_NO, substrate.getPackagingBoxId());
|
||||
boxQueryWrapper.eq(StringUtils.isNotBlank(substrate.getPackagingBoxId()), WoPackagingBox.BOX_NO, substrate.getPackagingBoxId());
|
||||
List<WoPackagingBox> woPackagingBoxList = mapper.selectList(boxQueryWrapper);
|
||||
boxList.addAll(woPackagingBoxList);
|
||||
}
|
||||
return boxList;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public IdVo insertSubstrateManual(WoPackagingBoxDTO dto) {
|
||||
//新增包装箱
|
||||
WoPackagingBox box = ConvertUtils.sourceToTarget(dto, WoPackagingBox.class);
|
||||
BaseSupportUtils.setCommonField(box);
|
||||
insert(box);
|
||||
//新增模组
|
||||
List<WoPackagingBoxSubstrate> substrateList = dto.getSubstrateList();
|
||||
for(WoPackagingBoxSubstrate substrate : substrateList){
|
||||
substrate.setPackagingBoxId(box.getBoxNo());
|
||||
substrate.setPowerLevel(box.getPowerLevel());
|
||||
BaseSupportUtils.setCommonField(substrate);
|
||||
woPackagingBoxSubstrateServiceBiz.insert(substrate);
|
||||
}
|
||||
return IdVo.builder().id(box.getId()).build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateIsArrivedByBoxNo(Integer isArrived, String boxNo) {
|
||||
return mapper.updateIsArrivedByBoxNo(isArrived,boxNo);
|
||||
|
@ -163,12 +163,8 @@ public class WoPackagingBoxSubstrateServiceBizImpl extends CrudServiceImpl<WoPac
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void insertSubstrateManual(ChangePackingBoxDTO[] dtos) {
|
||||
for(ChangePackingBoxDTO dto : dtos) {
|
||||
// QueryWrapper<WoPackagingBoxSubstrate> wrapper = new QueryWrapper<>();
|
||||
// wrapper.eq(StringUtils.isNotBlank(dto.getWoSubstrateId()), WoPackagingBoxSubstrate.WO_SUBSTRATE_ID, dto.getWoSubstrateId());
|
||||
WoPackagingBoxSubstrate entity = ConvertUtils.sourceToTarget(dto, WoPackagingBoxSubstrate.class);
|
||||
BaseSupportUtils.setCommonField(entity);
|
||||
insert(entity);
|
||||
/*
|
||||
QueryWrapper<WoPackagingBoxSubstrate> wrapper = new QueryWrapper<>();
|
||||
wrapper.eq(StringUtils.isNotBlank(dto.getWoSubstrateId()), WoPackagingBoxSubstrate.WO_SUBSTRATE_ID, dto.getWoSubstrateId());
|
||||
if (mapper.selectCount(wrapper) > 0 && StringUtils.isNotBlank(dto.getWoSubstrateId())) {
|
||||
WoPackagingBoxSubstrate substrate = mapper.selectList(wrapper).get(0);
|
||||
substrate.setPackagingBoxId(dto.getPackagingBoxId());
|
||||
@ -185,17 +181,6 @@ public class WoPackagingBoxSubstrateServiceBizImpl extends CrudServiceImpl<WoPac
|
||||
BaseSupportUtils.setCommonField(entity);
|
||||
insert(entity);
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void updateSubstrateManual(ChangePackingBoxDTO[] dtos) {
|
||||
for(ChangePackingBoxDTO dto : dtos) {
|
||||
WoPackagingBoxSubstrate entity = ConvertUtils.sourceToTarget(dto, WoPackagingBoxSubstrate.class);
|
||||
BaseSupportUtils.setUpdateCommonField(entity);
|
||||
updateById(entity);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
||||
and type = #{type}
|
||||
</if>
|
||||
</where>
|
||||
order by CREATE_TIME desc
|
||||
order by id asc
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
Loading…
Reference in New Issue
Block a user