外协镀种规则字段顺序修改;

外协订单收回后,特殊外协处理暂时屏蔽
liweidong
qinyulong 1 month ago
parent cec7cac221
commit e5736f7865
  1. 9
      blade-service-api/blade-desk-api/src/main/java/org/springblade/desk/oem/pojo/excel/PlatingTypeRulesImport.java
  2. 3
      blade-service-api/blade-desk-api/src/main/java/org/springblade/desk/oem/pojo/vo/PlatingTypeRulesVO.java
  3. 4
      blade-service/blade-desk/src/main/java/org/springblade/desk/oem/controller/PlatingTypeRulesController.java
  4. 2
      blade-service/blade-desk/src/main/java/org/springblade/desk/oem/service/IPlatingTypeRulesService.java
  5. 23
      blade-service/blade-desk/src/main/java/org/springblade/desk/oem/service/impl/PlatingTypeRulesServiceImpl.java
  6. 6
      blade-service/blade-desk/src/main/java/org/springblade/desk/oem/wrapper/PlatingTypeRulesWrapper.java
  7. 6
      blade-service/blade-desk/src/main/java/org/springblade/desk/produce/service/impl/WorkOrderRunServiceImpl.java
  8. BIN
      blade-service/blade-desk/src/main/resources/Excel/oem/外协镀种规则.xls

@ -16,14 +16,15 @@ import org.springblade.core.mp.base.BaseEntity;
public class PlatingTypeRulesImport extends BaseEntity {
/**
* 单镀种
* 报价单镀种
*/
@ExcelProperty(index = 0)
private String orderPlat;
private String quotationPlat;
/**
* 报价单镀种
* 单镀种
*/
@ExcelProperty(index = 1)
private String quotationPlat;
private String orderPlat;
}

@ -1,5 +1,6 @@
package org.springblade.desk.oem.pojo.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import org.springblade.desk.oem.pojo.entity.PlatingTypeRulesEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
@ -18,4 +19,6 @@ public class PlatingTypeRulesVO extends PlatingTypeRulesEntity {
@Serial
private static final long serialVersionUID = 1L;
@Schema(description = "创建人")
private String createUserName;
}

@ -32,6 +32,7 @@ import org.springblade.core.tool.utils.DateUtil;
import org.springblade.core.excel.util.ExcelUtil;
import org.springblade.core.tool.constant.BladeConstant;
import java.util.Date;
import java.util.Map;
import java.util.List;
@ -81,6 +82,7 @@ public class PlatingTypeRulesController extends BladeController {
@ApiOperationSupport(order = 4)
@Operation(summary = "新增", description = "传入mesPlatingTypeRules")
public R save(@Valid @RequestBody PlatingTypeRulesEntity mesPlatingTypeRules) {
mesPlatingTypeRules.setCreateTime(new Date());
mesPlatingTypeRules.setCreateUser(AuthUtil.getUserId());
return R.status(mesPlatingTypeRulesService.save(mesPlatingTypeRules));
}
@ -92,6 +94,7 @@ public class PlatingTypeRulesController extends BladeController {
@ApiOperationSupport(order = 5)
@Operation(summary = "修改", description = "传入mesPlatingTypeRules")
public R update(@Valid @RequestBody PlatingTypeRulesEntity mesPlatingTypeRules) {
mesPlatingTypeRules.setCreateTime(new Date());
return R.status(mesPlatingTypeRulesService.updateById(mesPlatingTypeRules));
}
@ -103,6 +106,7 @@ public class PlatingTypeRulesController extends BladeController {
@Operation(summary = "新增或修改", description = "传入mesPlatingTypeRules")
public R submit(@Valid @RequestBody PlatingTypeRulesEntity mesPlatingTypeRules) {
mesPlatingTypeRules.setCreateUser(AuthUtil.getUserId());
mesPlatingTypeRules.setCreateTime(new Date());
return R.status(mesPlatingTypeRulesService.saveOrUpdate(mesPlatingTypeRules));
}

@ -25,7 +25,7 @@ public interface IPlatingTypeRulesService extends BaseService<PlatingTypeRulesEn
* @param mesPlatingTypeRules 查询参数
* @return IPage<PlatingTypeRulesVO>
*/
IPage<PlatingTypeRulesVO> selectPlatingTypeRulesPage(IPage<PlatingTypeRulesVO> page, PlatingTypeRulesVO mesPlatingTypeRules);
IPage<PlatingTypeRulesVO> selectPlatingTypeRulesPage(IPage<PlatingTypeRulesEntity> page, PlatingTypeRulesVO mesPlatingTypeRules);
/**

@ -1,7 +1,11 @@
package org.springblade.desk.oem.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import org.springblade.core.secure.utils.AuthUtil;
import org.springblade.core.tool.api.R;
import org.springblade.desk.device.pojo.entity.MeasurementRecordsEntity;
import org.springblade.desk.device.wrapper.MeasurementRecordsWrapper;
import org.springblade.desk.oem.pojo.entity.OemProcessEntity;
import org.springblade.desk.oem.pojo.entity.PlatingTypeRulesEntity;
import org.springblade.desk.oem.pojo.excel.PlatingTypeRulesExcel;
@ -9,6 +13,7 @@ import org.springblade.desk.oem.pojo.excel.PlatingTypeRulesImport;
import org.springblade.desk.oem.pojo.vo.PlatingTypeRulesVO;
import org.springblade.desk.oem.mapper.PlatingTypeRulesMapper;
import org.springblade.desk.oem.service.IPlatingTypeRulesService;
import org.springblade.desk.oem.wrapper.PlatingTypeRulesWrapper;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
@ -18,6 +23,9 @@ import org.springblade.core.mp.base.BaseServiceImpl;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import static com.alibaba.druid.sql.visitor.SQLEvalVisitorUtils.like;
/**
* 外协镀种规则 服务实现类
@ -29,8 +37,19 @@ import java.util.List;
public class PlatingTypeRulesServiceImpl extends BaseServiceImpl<PlatingTypeRulesMapper, PlatingTypeRulesEntity> implements IPlatingTypeRulesService {
@Override
public IPage<PlatingTypeRulesVO> selectPlatingTypeRulesPage(IPage<PlatingTypeRulesVO> page, PlatingTypeRulesVO mesPlatingTypeRules) {
return page.setRecords(baseMapper.selectPlatingTypeRulesPage(page, mesPlatingTypeRules));
public IPage<PlatingTypeRulesVO> selectPlatingTypeRulesPage(IPage<PlatingTypeRulesEntity> page, PlatingTypeRulesVO mesPlatingTypeRules) {
// 1. 创建条件构造器
LambdaQueryWrapper<PlatingTypeRulesEntity> wrapper = Wrappers.<PlatingTypeRulesEntity>lambdaQuery();
// 2. 动态添加条件(核心!)
// 根据实体对象 entity 中字段是否为空,来动态拼接WHERE条件
wrapper.like(Objects.nonNull(mesPlatingTypeRules.getOrderPlat()), PlatingTypeRulesEntity::getOrderPlat, mesPlatingTypeRules.getOrderPlat())
.like(Objects.nonNull(mesPlatingTypeRules.getQuotationPlat()), PlatingTypeRulesEntity::getQuotationPlat, mesPlatingTypeRules.getQuotationPlat());
// 3. 执行分页查询
IPage<PlatingTypeRulesEntity> platingTypeRulesEntityIPage = baseMapper.selectPage(page, wrapper);
return PlatingTypeRulesWrapper.build().pageVO(platingTypeRulesEntityIPage);
}

@ -4,6 +4,8 @@ import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.springblade.desk.oem.pojo.entity.PlatingTypeRulesEntity;
import org.springblade.desk.oem.pojo.vo.PlatingTypeRulesVO;
import org.springblade.system.cache.UserCache;
import org.springblade.system.pojo.entity.User;
import java.util.Objects;
@ -23,9 +25,9 @@ public class PlatingTypeRulesWrapper extends BaseEntityWrapper<PlatingTypeRulesE
public PlatingTypeRulesVO entityVO(PlatingTypeRulesEntity mesPlatingTypeRules) {
PlatingTypeRulesVO mesPlatingTypeRulesVO = Objects.requireNonNull(BeanUtil.copyProperties(mesPlatingTypeRules, PlatingTypeRulesVO.class));
//User createUser = UserCache.getUser(mesPlatingTypeRules.getCreateUser());
User createUser = UserCache.getUser(mesPlatingTypeRules.getCreateUser());
//User updateUser = UserCache.getUser(mesPlatingTypeRules.getUpdateUser());
//mesPlatingTypeRulesVO.setCreateUserName(createUser.getName());
mesPlatingTypeRulesVO.setCreateUserName(createUser.getRealName());
//mesPlatingTypeRulesVO.setUpdateUserName(updateUser.getName());
return mesPlatingTypeRulesVO;

@ -506,10 +506,10 @@ public class WorkOrderRunServiceImpl extends BaseServiceImpl<WorkOrderRunMapper,
// 更新运行记录状态
updateWorkOrderRun(workOrderRun, deliverKey, workOrder.getOemType());
// 处理特殊外协逻辑
if (workOrder.getOemType() == 2) {
// 处理特殊外协逻辑,暂时屏蔽
/*if (workOrder.getOemType() == 2) {
handleSpecialOemLogic(workOrder, deliverablePlan);
}
}*/
}
/**

Loading…
Cancel
Save