|
@@ -1,6 +1,7 @@
|
|
|
package org.dromara.productionManagement.service.impl;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import org.dromara.common.core.utils.StringUtils;
|
|
@@ -12,6 +13,7 @@ import org.dromara.productionManagement.mapper.ProductionPlanMapper;
|
|
|
import org.dromara.productionManagement.service.ProductionPlanService;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.util.Date;
|
|
|
import java.util.Map;
|
|
|
|
|
|
/**
|
|
@@ -23,6 +25,12 @@ public class ProductionPlanServiceImpl implements ProductionPlanService {
|
|
|
|
|
|
private final ProductionPlanMapper productionPlanMapper;
|
|
|
|
|
|
+ /**
|
|
|
+ * 分页查询生产计划
|
|
|
+ * @param params 查询条件
|
|
|
+ * @param pageQuery 分页条件
|
|
|
+ * @return 分页结果
|
|
|
+ */
|
|
|
@Override
|
|
|
public TableDataInfo<ProductionPlanVo> selectVoPage(Map<String,Object> params, PageQuery pageQuery) {
|
|
|
QueryWrapper<ProductionPlan> qw = new QueryWrapper<>();
|
|
@@ -43,7 +51,8 @@ public class ProductionPlanServiceImpl implements ProductionPlanService {
|
|
|
qw.eq(null != params.get("isBuHuo"), "p.is_buhuo", params.get("isBuHuo"));
|
|
|
qw.eq(null != params.get("isUrgent"), "p.is_urgent", params.get("isUrgent"));
|
|
|
qw.eq(StringUtils.isNotBlank((CharSequence) params.get("isSys")), "p.is_sys", params.get("isSys"));
|
|
|
- qw.eq(null != params.get("craftAttrBo"), "gi.goods_type_extend_3_attr", params.get("craftAttrBo"));//构建完整的工艺扩展信息对象的JSON数据
|
|
|
+ //需构建完整的工艺扩展信息对象的JSON数据
|
|
|
+ qw.eq(null != params.get("craftAttrBo"), "gi.goods_type_extend_3_attr", params.get("craftAttrBo"));
|
|
|
qw.eq(StringUtils.isNotBlank((CharSequence) params.get("brandGroup")),"gi.brand_group", params.get("brandGroup"));
|
|
|
qw.eq(null != params.get("outFactoryId"),"p.out_factory_id", params.get("outFactoryId"));
|
|
|
qw.eq(null != params.get("shFactoryId"),"p.sh_factory_id", params.get("shFactoryId"));
|
|
@@ -51,4 +60,82 @@ public class ProductionPlanServiceImpl implements ProductionPlanService {
|
|
|
Page<ProductionPlanVo> page = productionPlanMapper.selectProductionPlanVo(pageQuery.build(), qw);
|
|
|
return TableDataInfo.build(page);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 更新数码印花厂id
|
|
|
+ * @param id 订单id
|
|
|
+ * @param outFactory 数码印花厂id
|
|
|
+ * @return 结果
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public int updateOutFactory(Long id, int outFactory) {
|
|
|
+ UpdateWrapper<ProductionPlan> uw = new UpdateWrapper<>();
|
|
|
+ uw.eq("id", id).set("out_factory_id", outFactory);
|
|
|
+ return productionPlanMapper.update(uw);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 更新烧花厂id
|
|
|
+ * @param id 订单id
|
|
|
+ * @param SHFactory 烧花厂id
|
|
|
+ * @return 结果
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public int updateSHFactory(Long id, int SHFactory) {
|
|
|
+ UpdateWrapper<ProductionPlan> uw = new UpdateWrapper<>();
|
|
|
+ uw.eq("id", id).set("sh_factory_id", SHFactory);
|
|
|
+ return productionPlanMapper.update(uw);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 更新订单状态
|
|
|
+ * @param id 订单id
|
|
|
+ * @param craftStatus 状态码
|
|
|
+ * @return 结果
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public int updateCraftStatus(Long id, int craftStatus) {
|
|
|
+ UpdateWrapper<ProductionPlan> uw = new UpdateWrapper<>();
|
|
|
+ uw.eq("id", id).set("craft_status", craftStatus);
|
|
|
+ return productionPlanMapper.update(uw);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 更新打印状态
|
|
|
+ * @param id 订单id
|
|
|
+ * @param printStatus 打印状态码
|
|
|
+ * @return 结果
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public int updatePrintStatus(Long id, int printStatus) {
|
|
|
+ UpdateWrapper<ProductionPlan> uw = new UpdateWrapper<>();
|
|
|
+ uw.eq("id", id).set("print_status", printStatus);
|
|
|
+ return productionPlanMapper.update(uw);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 更新发货时间
|
|
|
+ * @param id 订单id
|
|
|
+ * @param deliveryTime 发货时间
|
|
|
+ * @return 结果
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public int updateDeliveryTime(Long id, Date deliveryTime) {
|
|
|
+ UpdateWrapper<ProductionPlan> uw = new UpdateWrapper<>();
|
|
|
+ uw.eq("id", id).set("shipping_time", deliveryTime);
|
|
|
+ return productionPlanMapper.update(uw);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 更新确认收货时间
|
|
|
+ * @param id 订单id
|
|
|
+ * @param confirmDeliveryTime 确认收货时间
|
|
|
+ * @return 结果
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public int updateConfirmDeliveryTime(Long id, Date confirmDeliveryTime) {
|
|
|
+ UpdateWrapper<ProductionPlan> uw = new UpdateWrapper<>();
|
|
|
+ uw.eq("id", id).set("confirm_delivery_time", confirmDeliveryTime);
|
|
|
+ return productionPlanMapper.update(uw);
|
|
|
+ }
|
|
|
}
|