Commit 50cb8d4b authored by wanglong's avatar wanglong

优化代码

parent f624ef9c
...@@ -13,12 +13,10 @@ import java.util.Map; ...@@ -13,12 +13,10 @@ import java.util.Map;
public enum WeldCodeEnum { public enum WeldCodeEnum {
//焊口编码赋码状态 //焊口编码赋码状态
未赋值("未赋值","0"), 未赋值("未赋值","0"),
已赋值("已赋值","1"), 已赋值("已赋值","1");
/** /**
* 焊口编码赋码方式 * 焊口编码赋码方式
*/ */
自动赋码("自动赋码", "0"),
手动赋码("手动赋码", "1");
......
package com.yeejoin.amos.boot.module.ugp.api.Enum;
import lombok.AllArgsConstructor;
import lombok.Getter;
import java.util.HashMap;
import java.util.Map;
@Getter
@AllArgsConstructor
public enum WeldMethodEnum {
自动赋码("自动赋码", "0"),
手动赋码("手动赋码", "1");
private String name;
private String state;
public static final Map<String,String> map=new HashMap<>();
static{
for (WeldMethodEnum weldMethodEnum:WeldMethodEnum.values()){
map.put(weldMethodEnum.getState(),weldMethodEnum.getName());
}
}
}
...@@ -216,9 +216,9 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper ...@@ -216,9 +216,9 @@ public class VerifyServiceImpl extends BaseService<VerifyDto,Verify,VerifyMapper
if (i) { if (i) {
verify.setStatus(VerifyEnum.已通过.getStatus()); verify.setStatus(VerifyEnum.已通过.getStatus());
LambdaQueryWrapper<Weld> wrapper1 = new LambdaQueryWrapper<>(); LambdaQueryWrapper<Weld> wrapperWeld = new LambdaQueryWrapper<>();
wrapper1.eq(Weld::getCode,jsonObject.getString("code")); wrapperWeld.eq(Weld::getCode,jsonObject.getString("code"));
Weld weld = weldMapper.selectOne(wrapper1); Weld weld = weldMapper.selectOne(wrapperWeld);
weld.setSuperInspecStatus(StageEnum.焊接工艺.getStage()); weld.setSuperInspecStatus(StageEnum.焊接工艺.getStage());
weldService.updateById(weld); weldService.updateById(weld);
......
...@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; ...@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr; import com.yeejoin.amos.boot.module.common.api.entity.OrgUsr;
import com.yeejoin.amos.boot.module.ugp.api.Enum.WeldCodeEnum; import com.yeejoin.amos.boot.module.ugp.api.Enum.WeldCodeEnum;
import com.yeejoin.amos.boot.module.ugp.api.Enum.WeldMethodEnum;
import com.yeejoin.amos.boot.module.ugp.api.dto.WeldDto; import com.yeejoin.amos.boot.module.ugp.api.dto.WeldDto;
import com.yeejoin.amos.boot.module.ugp.api.entity.Project; import com.yeejoin.amos.boot.module.ugp.api.entity.Project;
import com.yeejoin.amos.boot.module.ugp.api.entity.SuperviseRule; import com.yeejoin.amos.boot.module.ugp.api.entity.SuperviseRule;
...@@ -159,7 +160,7 @@ class WeldServiceImpl extends BaseService<WeldDto, Weld, WeldMapper> implements ...@@ -159,7 +160,7 @@ class WeldServiceImpl extends BaseService<WeldDto, Weld, WeldMapper> implements
weld.setInstallCompany(project.getInstallationUnitId()); weld.setInstallCompany(project.getInstallationUnitId());
weld.setCode(code); weld.setCode(code);
weld.setRegion(project.getAddress()); weld.setRegion(project.getAddress());
weld.setCodingMethod(WeldCodeEnum.自动赋码.getState()); weld.setCodingMethod(WeldMethodEnum.自动赋码.getState());
weld.setCodingStatus(WeldCodeEnum.已赋值.getState()); weld.setCodingStatus(WeldCodeEnum.已赋值.getState());
weld.setCodingDate(new Date()); weld.setCodingDate(new Date());
welds.add(weld); welds.add(weld);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment