|
@@ -5,6 +5,8 @@ import java.util.stream.Collectors;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
import javax.validation.Valid;
|
|
|
|
|
|
+import cn.hutool.core.collection.CollectionUtil;
|
|
|
+import cn.hutool.core.util.ArrayUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
@@ -465,7 +467,7 @@ public class OrderClothItemController extends BaseController {
|
|
|
@ApiOperation("查询工厂衣服记录")
|
|
|
public TableDataInfo findFactoryClothPage(OrderClothItemFactoryQueryDTO orderClothItemFactoryQueryDTO) throws Exception {
|
|
|
startPage();
|
|
|
- if (orderClothItemFactoryQueryDTO.getClothType()!=null && orderClothItemFactoryQueryDTO.getClothType().equals("2")) {
|
|
|
+ if (orderClothItemFactoryQueryDTO.getClothType() != null && orderClothItemFactoryQueryDTO.getClothType().equals("2")) {
|
|
|
LambdaQueryWrapper<OrderClothAdjunct> queryWrapper = new QueryWrapper<OrderClothAdjunct>().lambda()
|
|
|
.eq(OrderClothAdjunct::getFactoryId, SecurityUtils.getLoginUser().getOrgId());
|
|
|
if (StringUtils.isNotEmpty(orderClothItemFactoryQueryDTO.getFlowStatus())) {
|
|
@@ -641,9 +643,9 @@ public class OrderClothItemController extends BaseController {
|
|
|
for (OrderClothItem record : itemList) {
|
|
|
OrderClothItemVO orderClothItemVO = new OrderClothItemVO();
|
|
|
BeanUtils.copyProperties(record, orderClothItemVO);
|
|
|
- if(storeOrgMap.get(record.getOrgId())!=null){
|
|
|
+ if (storeOrgMap.get(record.getOrgId()) != null) {
|
|
|
orderClothItemVO.setOrgName(storeOrgMap.get(record.getOrgId()).getName());
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
orderClothItemVO.setOrgName("--");
|
|
|
}
|
|
|
itemVOList.add(orderClothItemVO);
|
|
@@ -879,10 +881,10 @@ public class OrderClothItemController extends BaseController {
|
|
|
public R<OrderClothItemVO> getInfo(@PathVariable("id") Long id) {
|
|
|
LambdaQueryWrapper<OrderClothItem> queryWrapper = new QueryWrapper<OrderClothItem>().lambda()
|
|
|
.eq(OrderClothItem::getId, id);
|
|
|
- if(SourceType.FACTORY.getCode().equals(SecurityUtils.getLoginUser().getSourceType())){
|
|
|
+ if (SourceType.FACTORY.getCode().equals(SecurityUtils.getLoginUser().getSourceType())) {
|
|
|
queryWrapper.eq(OrderClothItem::getFactoryId, SecurityUtils.getLoginUser().getOrgId());
|
|
|
}
|
|
|
- if(SourceType.STORE.getCode().equals(SecurityUtils.getLoginUser().getSourceType())){
|
|
|
+ if (SourceType.STORE.getCode().equals(SecurityUtils.getLoginUser().getSourceType())) {
|
|
|
queryWrapper.eq(OrderClothItem::getOrgId, SecurityUtils.getLoginUser().getOrgId());
|
|
|
}
|
|
|
OrderClothItem orderClothItem = orderClothItemService.getOne(queryWrapper
|
|
@@ -957,6 +959,24 @@ public class OrderClothItemController extends BaseController {
|
|
|
@GetMapping("/getOrderClothItemListByUpHanger")
|
|
|
@ApiOperation(value = "查询洗衣订单-待上挂衣服列表")
|
|
|
public R<Page<OrderClothItemVO>> getOrderClothItemListByUpHanger(OrderClothHangerDTO orderClothHangerDTO) {
|
|
|
+
|
|
|
+ if (StringUtils.isNotBlank(orderClothHangerDTO.getWashCode()) && orderClothHangerDTO.getWashCode().contains(OrderNoUtils.cloth_wash_adjust_code_header)) {
|
|
|
+ OrderClothItemVO orderClothItemVO = new OrderClothItemVO();
|
|
|
+ OrderClothAdjunct orderClothAdjunct = orderClothAdjunctService.selectOrderClothAdjunctByAdjunctNo(orderClothHangerDTO.getWashCode());
|
|
|
+ if (orderClothAdjunct == null) {
|
|
|
+ throw new ServiceException("未查询到衣物");
|
|
|
+ }
|
|
|
+ OrderClothItem orderClothItem = orderClothItemService.selectOrderClothItemById(orderClothAdjunct.getOrderClothId());
|
|
|
+ BeanUtils.copyProperties(orderClothItem, orderClothItemVO);
|
|
|
+ orderClothItemVO.setIsAdjunct("Y");
|
|
|
+ orderClothItemVO.setWashCode(orderClothAdjunct.getAdjunctNo());
|
|
|
+ orderClothItemVO.setClothItemName("【附件】" + orderClothItemVO.getClothItemName() + " * " + orderClothAdjunct.getAdjunctName());
|
|
|
+ List<OrderClothItemVO> orderClothItemVOList = CollectionUtil.newArrayList(orderClothItemVO);
|
|
|
+ Page<OrderClothItemVO> orderClothItemVOPage = new Page<>();
|
|
|
+ orderClothItemVOPage.setRecords(orderClothItemVOList);
|
|
|
+ orderClothItemVOPage.setTotal(1);
|
|
|
+ return R.ok(orderClothItemVOPage);
|
|
|
+ }
|
|
|
return R.ok(orderClothItemService.getOrderClothItemListByUpHanger(orderClothHangerDTO));
|
|
|
}
|
|
|
|