This commit is contained in:
2023-03-06 11:50:59 +08:00
parent b7a3548a47
commit bf0d6108a1
12 changed files with 63 additions and 129 deletions

View File

@@ -5,6 +5,7 @@ import com.cnbm.common.service.CrudService;
import com.cnbm.packing.dto.IdVo;
import com.cnbm.packing.dto.WoPackagingBoxDTO;
import com.cnbm.packing.entity.WoPackagingBox;
import com.cnbm.packing.entity.WoPackagingBoxSubstrate;
import java.util.List;
import java.util.Map;
@@ -31,6 +32,8 @@ public interface WoPackagingBoxServiceBiz extends CrudService<WoPackagingBox, Wo
WoPackagingBoxDTO printList(Long id);
List<WoPackagingBoxSubstrate> substrateList (Map<String, Object> params);
int updateIsArrivedByBoxNo(Integer isArrived, String boxNo);
}

View File

@@ -47,6 +47,10 @@ public class PrintModelServiceBizImpl extends CrudServiceImpl<PrintModelMapper,
Integer lineBody = Integer.parseInt(params.get("lineBody").toString());
wrapper.eq(ObjectUtils.isNotNull(lineBody), PrintModel.LINE_BODY, lineBody);
}
if(params.get("enabled")!=null) {
Integer enabled = Integer.parseInt(params.get("enabled").toString());
wrapper.eq(ObjectUtils.isNotNull(enabled), PrintModel.ENABLED, enabled);
}
return wrapper;
}

View File

@@ -20,6 +20,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
@@ -123,6 +124,20 @@ public class WoPackagingBoxServiceBizImpl extends CrudServiceImpl<WoPackagingBox
return dto;
}
@Override
public List<WoPackagingBoxSubstrate> substrateList(Map<String, Object> params) {
QueryWrapper<WoPackagingBox> boxQueryWrapper = getWrapper(params);
List<WoPackagingBox> boxList = mapper.selectList(boxQueryWrapper);
List<WoPackagingBoxSubstrate> substrateList = new ArrayList<>();
for(WoPackagingBox box: boxList){
QueryWrapper<WoPackagingBoxSubstrate> substrateQueryWrapper = new QueryWrapper<>();
substrateQueryWrapper.eq(StringUtils.isNotBlank(box.getBoxNo()), WoPackagingBoxSubstrate.PACKAGING_BOX_ID, box.getBoxNo());
List<WoPackagingBoxSubstrate> woPackagingBoxSubstrateList = substrateMapper.selectList(substrateQueryWrapper);
substrateList.addAll(woPackagingBoxSubstrateList);
}
return substrateList;
}
@Override
public int updateIsArrivedByBoxNo(Integer isArrived, String boxNo) {
return mapper.updateIsArrivedByBoxNo(isArrived,boxNo);

View File

@@ -14,17 +14,14 @@ import com.cnbm.packing.dto.ChangePackingBoxDTO;
import com.cnbm.packing.dto.WoPackagingBoxSubstrateDTO;
import com.cnbm.packing.entity.ChangePackagingBoxHistory;
import com.cnbm.packing.entity.WoPackagingBoxSubstrate;
import com.cnbm.packing.mapper.WoPackagingBoxMapper;
import com.cnbm.packing.mapper.WoPackagingBoxSubstrateMapper;
import com.cnbm.packing.service.ChangePackagingBoxHistoryServiceBiz;
import com.cnbm.packing.service.WoPackagingBoxSubstrateServiceBiz;
import org.apache.commons.lang3.StringUtils;
import org.omg.CORBA.PRIVATE_MEMBER;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.util.Arrays;
import java.util.Map;