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.DefaultGroup;
|
||||||
import com.cnbm.common.validator.group.UpdateGroup;
|
import com.cnbm.common.validator.group.UpdateGroup;
|
||||||
import com.cnbm.packing.dto.ChangePackagingBoxHistoryDTO;
|
import com.cnbm.packing.dto.ChangePackagingBoxHistoryDTO;
|
||||||
import com.cnbm.packing.entity.ChangePackagingBoxHistory;
|
|
||||||
import com.cnbm.packing.excel.ChangePackagingBoxHistoryExcel;
|
import com.cnbm.packing.excel.ChangePackagingBoxHistoryExcel;
|
||||||
import com.cnbm.packing.service.ChangePackagingBoxHistoryServiceBiz;
|
import com.cnbm.packing.service.ChangePackagingBoxHistoryServiceBiz;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
@ -118,7 +117,7 @@ public class ChangePackagingBoxHistoryController {
|
|||||||
})
|
})
|
||||||
@PreAuthorize("@ex.hasAuthority('packing:changePackagingBoxHistory:export')")
|
@PreAuthorize("@ex.hasAuthority('packing:changePackagingBoxHistory:export')")
|
||||||
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
|
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) {
|
if(list.size()>0) {
|
||||||
ExcelUtils.exportExcelToTarget(response, "包装箱模组操作记录", list, ChangePackagingBoxHistoryExcel.class);
|
ExcelUtils.exportExcelToTarget(response, "包装箱模组操作记录", list, ChangePackagingBoxHistoryExcel.class);
|
||||||
}
|
}
|
||||||
|
@ -159,13 +159,4 @@ public class WoPackagingBoxController {
|
|||||||
return woPackagingBoxService.boxList(woSubstrateId);
|
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();
|
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<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);
|
List<WoPackagingBox> boxList (String woSubstrateId);
|
||||||
|
|
||||||
IdVo insertSubstrateManual(WoPackagingBoxDTO dto);
|
|
||||||
|
|
||||||
|
|
||||||
int updateIsArrivedByBoxNo(Integer isArrived, String boxNo);
|
int updateIsArrivedByBoxNo(Integer isArrived, String boxNo);
|
||||||
|
|
||||||
|
@ -34,8 +34,6 @@ public interface WoPackagingBoxSubstrateServiceBiz extends CrudService<WoPackagi
|
|||||||
|
|
||||||
void insertSubstrateManual(ChangePackingBoxDTO[] dtos);
|
void insertSubstrateManual(ChangePackingBoxDTO[] dtos);
|
||||||
|
|
||||||
void updateSubstrateManual(ChangePackingBoxDTO[] dtos);
|
|
||||||
|
|
||||||
WoPackagingBoxSubstrate getBySubId(String subId);
|
WoPackagingBoxSubstrate getBySubId(String subId);
|
||||||
|
|
||||||
|
|
||||||
|
@ -48,9 +48,6 @@ public class ChangePackagingBoxHistoryServiceBizImpl extends CrudServiceImpl<Cha
|
|||||||
Integer type = Integer.parseInt( params.get("type").toString());
|
Integer type = Integer.parseInt( params.get("type").toString());
|
||||||
wrapper.eq(ObjectUtils.isNotNull(type), ChangePackagingBoxHistory.TYPE, type);
|
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;
|
return wrapper;
|
||||||
}
|
}
|
||||||
@ -58,8 +55,8 @@ public class ChangePackagingBoxHistoryServiceBizImpl extends CrudServiceImpl<Cha
|
|||||||
@Override
|
@Override
|
||||||
public PageData<ChangePackagingBoxHistoryDTO> page (Map<String, Object> params){
|
public PageData<ChangePackagingBoxHistoryDTO> page (Map<String, Object> params){
|
||||||
IPage<ChangePackagingBoxHistory> page = baseDao.selectPage(
|
IPage<ChangePackagingBoxHistory> page = baseDao.selectPage(
|
||||||
getPage(params, ChangePackagingBoxHistory.CREATE_TIME, true),
|
getPage(params, ChangePackagingBoxHistory.CREATE_TIME, true),
|
||||||
getWrapper(params)
|
getWrapper(params)
|
||||||
);
|
);
|
||||||
return getPageData(page, ChangePackagingBoxHistoryDTO.class);
|
return getPageData(page, ChangePackagingBoxHistoryDTO.class);
|
||||||
}
|
}
|
||||||
@ -100,12 +97,4 @@ public class ChangePackagingBoxHistoryServiceBizImpl extends CrudServiceImpl<Cha
|
|||||||
return list;
|
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.mapper.WoPackagingBoxSubstrateMapper;
|
||||||
import com.cnbm.packing.param.PowerReportQueryParam;
|
import com.cnbm.packing.param.PowerReportQueryParam;
|
||||||
import com.cnbm.packing.service.WoPackagingBoxServiceBiz;
|
import com.cnbm.packing.service.WoPackagingBoxServiceBiz;
|
||||||
import com.cnbm.packing.service.WoPackagingBoxSubstrateServiceBiz;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@ -42,8 +41,6 @@ public class WoPackagingBoxServiceBizImpl extends CrudServiceImpl<WoPackagingBox
|
|||||||
private WoPackagingBoxMapper mapper;
|
private WoPackagingBoxMapper mapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
private WoPackagingBoxSubstrateMapper substrateMapper;
|
private WoPackagingBoxSubstrateMapper substrateMapper;
|
||||||
@Autowired
|
|
||||||
private WoPackagingBoxSubstrateServiceBiz woPackagingBoxSubstrateServiceBiz;
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -71,9 +68,6 @@ public class WoPackagingBoxServiceBizImpl extends CrudServiceImpl<WoPackagingBox
|
|||||||
Integer model = Integer.parseInt(params.get("model").toString());
|
Integer model = Integer.parseInt(params.get("model").toString());
|
||||||
wrapper.eq(ObjectUtils.isNotNull(model), WoPackagingBox.MODEL, model);
|
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;
|
return wrapper;
|
||||||
}
|
}
|
||||||
@ -159,31 +153,13 @@ public class WoPackagingBoxServiceBizImpl extends CrudServiceImpl<WoPackagingBox
|
|||||||
List<WoPackagingBox> boxList = new ArrayList<>();
|
List<WoPackagingBox> boxList = new ArrayList<>();
|
||||||
for(WoPackagingBoxSubstrate substrate: substrateList){
|
for(WoPackagingBoxSubstrate substrate: substrateList){
|
||||||
QueryWrapper<WoPackagingBox> boxQueryWrapper = new QueryWrapper<>();
|
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);
|
List<WoPackagingBox> woPackagingBoxList = mapper.selectList(boxQueryWrapper);
|
||||||
boxList.addAll(woPackagingBoxList);
|
boxList.addAll(woPackagingBoxList);
|
||||||
}
|
}
|
||||||
return boxList;
|
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
|
@Override
|
||||||
public int updateIsArrivedByBoxNo(Integer isArrived, String boxNo) {
|
public int updateIsArrivedByBoxNo(Integer isArrived, String boxNo) {
|
||||||
return mapper.updateIsArrivedByBoxNo(isArrived,boxNo);
|
return mapper.updateIsArrivedByBoxNo(isArrived,boxNo);
|
||||||
|
@ -163,12 +163,8 @@ public class WoPackagingBoxSubstrateServiceBizImpl extends CrudServiceImpl<WoPac
|
|||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void insertSubstrateManual(ChangePackingBoxDTO[] dtos) {
|
public void insertSubstrateManual(ChangePackingBoxDTO[] dtos) {
|
||||||
for(ChangePackingBoxDTO dto : dtos) {
|
for(ChangePackingBoxDTO dto : dtos) {
|
||||||
// QueryWrapper<WoPackagingBoxSubstrate> wrapper = new QueryWrapper<>();
|
QueryWrapper<WoPackagingBoxSubstrate> wrapper = new QueryWrapper<>();
|
||||||
// wrapper.eq(StringUtils.isNotBlank(dto.getWoSubstrateId()), WoPackagingBoxSubstrate.WO_SUBSTRATE_ID, dto.getWoSubstrateId());
|
wrapper.eq(StringUtils.isNotBlank(dto.getWoSubstrateId()), WoPackagingBoxSubstrate.WO_SUBSTRATE_ID, dto.getWoSubstrateId());
|
||||||
WoPackagingBoxSubstrate entity = ConvertUtils.sourceToTarget(dto, WoPackagingBoxSubstrate.class);
|
|
||||||
BaseSupportUtils.setCommonField(entity);
|
|
||||||
insert(entity);
|
|
||||||
/*
|
|
||||||
if (mapper.selectCount(wrapper) > 0 && StringUtils.isNotBlank(dto.getWoSubstrateId())) {
|
if (mapper.selectCount(wrapper) > 0 && StringUtils.isNotBlank(dto.getWoSubstrateId())) {
|
||||||
WoPackagingBoxSubstrate substrate = mapper.selectList(wrapper).get(0);
|
WoPackagingBoxSubstrate substrate = mapper.selectList(wrapper).get(0);
|
||||||
substrate.setPackagingBoxId(dto.getPackagingBoxId());
|
substrate.setPackagingBoxId(dto.getPackagingBoxId());
|
||||||
@ -185,17 +181,6 @@ public class WoPackagingBoxSubstrateServiceBizImpl extends CrudServiceImpl<WoPac
|
|||||||
BaseSupportUtils.setCommonField(entity);
|
BaseSupportUtils.setCommonField(entity);
|
||||||
insert(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}
|
and type = #{type}
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
order by CREATE_TIME desc
|
order by id asc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
Loading…
Reference in New Issue
Block a user