|
@@ -4,6 +4,7 @@ import cn.hutool.core.bean.BeanUtil;
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
import com.alibaba.fastjson2.JSONObject;
|
|
|
+import com.baomidou.dynamic.datasource.annotation.DSTransactional;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.fjhx.common.utils.Assert;
|
|
@@ -315,8 +316,7 @@ public class ProduceOrderDetailServiceImpl extends ServiceImpl<ProduceOrderDetai
|
|
|
public List<ProductionOrderDetailVo> detailByIds(List<Long> taskIds) {
|
|
|
Assert.notEmpty(taskIds, "任务id列表不能为空");
|
|
|
|
|
|
- List<ProductionOrderDetail> productionOrderDetailList = this.list(q -> q.in(ProductionOrderDetail::getId, taskIds));
|
|
|
- List<ProductionOrderDetailVo> voList = BeanUtil.copyToList(productionOrderDetailList, ProductionOrderDetailVo.class);
|
|
|
+ List<ProductionOrderDetailVo> voList = baseMapper.getPage(getWrapper().in("pod", ProductionOrderDetail::getId, taskIds));
|
|
|
|
|
|
//赋值订单信息
|
|
|
produceOrderService.attributeAssign(voList, ProductionOrderDetailVo::getProduceOrderId, (detail, order) -> {
|
|
@@ -396,6 +396,14 @@ public class ProduceOrderDetailServiceImpl extends ServiceImpl<ProduceOrderDetai
|
|
|
detail.setProductionTaskProgressList(ptpMap.get(detail.getId()));
|
|
|
}
|
|
|
|
|
|
+ //赋值业务员名称
|
|
|
+ UserUtil.assignmentNickName(voList, ProductionOrderDetailVo::getSaleUserId, ProductionOrderDetailVo::setSaleUserName);
|
|
|
+
|
|
|
+ //赋值客户名称
|
|
|
+ customerService.attributeAssign(voList, ProductionOrderDetailVo::getCustomerId, (item, customer) -> {
|
|
|
+ item.setCustomerName(customer.getName());
|
|
|
+ });
|
|
|
+
|
|
|
return voList;
|
|
|
}
|
|
|
|
|
@@ -451,4 +459,10 @@ public class ProduceOrderDetailServiceImpl extends ServiceImpl<ProduceOrderDetai
|
|
|
);
|
|
|
}
|
|
|
|
|
|
+ @DSTransactional
|
|
|
+ @Override
|
|
|
+ public void editBeginWork(ProductionOrderDetailDto dto) {
|
|
|
+ this.updateById(dto);
|
|
|
+ }
|
|
|
+
|
|
|
}
|