This commit is contained in:
zds
2022-11-28 10:52:44 +08:00
parent 152c72a313
commit ae1202cf80
9 changed files with 44 additions and 36 deletions

View File

@@ -44,7 +44,7 @@ public class DeviceinfoServiceImpl implements DeviceinfoService {
if (ObjectUtil.isNotEmpty(device_code)) { if (ObjectUtil.isNotEmpty(device_code)) {
map.put("device_code", "%" + device_code + "%"); map.put("device_code", "%" + device_code + "%");
} }
JSONObject json = WQL.getWO("QEM_BI_DEVICEINFO01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "e.create_time desc"); JSONObject json = WQL.getWO("QEM_BI_DEVICEINFO01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "e.device_code");
return json; return json;
} }

View File

@@ -97,7 +97,7 @@ public class StructattrServiceImpl implements StructattrService {
String struct_code = dto.getStruct_code(); String struct_code = dto.getStruct_code();
StructattrDto structattrDto = this.findByCode(struct_code); StructattrDto structattrDto = this.findByCode(struct_code);
if (structattrDto != null && structattrDto.getIs_delete().equals("0")) { if (structattrDto != null && structattrDto.getIs_delete().equals("0")) {
throw new BadRequestException("存在相同的库区编号"); throw new BadRequestException("存在相同的编号");
} }
Long currentUserId = SecurityUtils.getCurrentUserId(); Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName(); String nickName = SecurityUtils.getNickName();
@@ -150,13 +150,12 @@ public class StructattrServiceImpl implements StructattrService {
if (entity == null) { if (entity == null) {
throw new BadRequestException("被删除或无权限,操作失败!"); throw new BadRequestException("被删除或无权限,操作失败!");
} }
WQLObject wo = WQLObject.getWQLObject("st_ivt_structattr");
String struct_code = dto.getStruct_code(); String struct_code = dto.getStruct_code();
StructattrDto structattrDto = this.findByCode(struct_code); JSONObject old = wo.query("is_delete='0' and struct_code='"+dto.getStruct_code()+"' and struct_id<>'"+dto.getStruct_id()+"'").uniqueResult(0);
if (structattrDto != null && !dto.getStruct_id().equals(structattrDto.getStruct_id()) && structattrDto.getIs_delete().equals("0")) { if(old!=null){
throw new BadRequestException("存在相同的库区编号"); throw new BadRequestException("存在相同编码!");
} }
Long currentUserId = SecurityUtils.getCurrentUserId(); Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName(); String nickName = SecurityUtils.getNickName();
@@ -183,8 +182,6 @@ public class StructattrServiceImpl implements StructattrService {
dto.setStoragevehicle_type(obj.getString("storagevehicle_type")); dto.setStoragevehicle_type(obj.getString("storagevehicle_type"));
} }
WQLObject wo = WQLObject.getWQLObject("st_ivt_structattr");
JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto)); JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto));
wo.update(json); wo.update(json);

View File

@@ -88,6 +88,10 @@ public class ProcessrouteServiceImpl implements ProcessrouteService {
WQLObject workTab = WQLObject.getWQLObject("pdm_bi_workprocedure"); // 工序表 WQLObject workTab = WQLObject.getWQLObject("pdm_bi_workprocedure"); // 工序表
JSONArray jsonDataArr = json.getJSONArray("tableData"); JSONArray jsonDataArr = json.getJSONArray("tableData");
JSONObject old = mstTab.query("is_delete='0' and processroute_code='"+json.getString("processroute_code")+"'").uniqueResult(0);
if(old!=null){
throw new BadRequestException("已存在相同编码!");
}
// 插入主表 // 插入主表
JSONObject jsonMst = new JSONObject(); JSONObject jsonMst = new JSONObject();
jsonMst.put("processroute_id", IdUtil.getSnowflake(1, 1).nextId()); jsonMst.put("processroute_id", IdUtil.getSnowflake(1, 1).nextId());
@@ -132,6 +136,10 @@ public class ProcessrouteServiceImpl implements ProcessrouteService {
WQLObject dtlTab = WQLObject.getWQLObject("PDM_BI_ProcessRouteDtl"); // 工艺路线明细表 WQLObject dtlTab = WQLObject.getWQLObject("PDM_BI_ProcessRouteDtl"); // 工艺路线明细表
WQLObject workTab = WQLObject.getWQLObject("pdm_bi_workprocedure"); // 工序表 WQLObject workTab = WQLObject.getWQLObject("pdm_bi_workprocedure"); // 工序表
JSONObject old = mstTab.query("is_delete='0' and processroute_code='"+whereJson.getString("processroute_code")+"' and processroute_id<>'"+processroute_id+"'").uniqueResult(0);
if(old!=null){
throw new BadRequestException("已存在相同编码!");
}
JSONArray dataArr = whereJson.getJSONArray("tableData"); JSONArray dataArr = whereJson.getJSONArray("tableData");
// 更新主表 // 更新主表
JSONObject jsonMst = mstTab.query("processroute_id= '" + processroute_id + "'").uniqueResult(0); JSONObject jsonMst = mstTab.query("processroute_id= '" + processroute_id + "'").uniqueResult(0);

View File

@@ -71,7 +71,7 @@ public class PointServiceImpl implements PointService {
@Override @Override
public PointDto findByCode(String code) { public PointDto findByCode(String code) {
WQLObject wo = WQLObject.getWQLObject("sch_base_point"); WQLObject wo = WQLObject.getWQLObject("sch_base_point");
JSONObject json = wo.query("point_code ='" + code + "'").uniqueResult(0); JSONObject json = wo.query("is_delete = '0' and point_code ='" + code + "'").uniqueResult(0);
if (ObjectUtil.isNotEmpty(json)){ if (ObjectUtil.isNotEmpty(json)){
return json.toJavaObject(PointDto.class); return json.toJavaObject(PointDto.class);
} }
@@ -82,9 +82,10 @@ public class PointServiceImpl implements PointService {
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void create(PointDto dto) { public void create(PointDto dto) {
String point_code = dto.getPoint_code(); String point_code = dto.getPoint_code();
PointDto byCode = this.findByCode(point_code); WQLObject wo = WQLObject.getWQLObject("sch_base_point");
if (ObjectUtil.isNotEmpty(byCode)) { JSONObject old = wo.query("is_delete = '0' and point_code='"+dto.getPoint_code()+"'").uniqueResult(0);
throw new BadRequestException("存在相同的点位编码"); if(old!=null){
throw new BadRequestException("已存在相同编码!");
} }
Long currentUserId = SecurityUtils.getCurrentUserId(); Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName(); String nickName = SecurityUtils.getNickName();
@@ -98,9 +99,15 @@ public class PointServiceImpl implements PointService {
dto.setUpdate_time(now); dto.setUpdate_time(now);
dto.setCreate_time(now); dto.setCreate_time(now);
WQLObject wo = WQLObject.getWQLObject("sch_base_point");
JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto)); JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto));
wo.insert(json); wo.insert(json);
//根据仓位更新点位载具和锁定信息
// 点位基础表【SCH_BASE_Point】
JSONObject param = new JSONObject();
param.put("is_used", dto.getIs_used());
param.put("storagevehicle_code", dto.getVehicle_code());
param.put("lock_type", dto.getLock_type());
WQLObject.getWQLObject("st_ivt_structattr").update(param, "struct_code = '" + dto.getPoint_code() + "'");
} }
@Override @Override
@@ -110,7 +117,11 @@ public class PointServiceImpl implements PointService {
if (entity == null) { if (entity == null) {
throw new BadRequestException("被删除或无权限,操作失败!"); throw new BadRequestException("被删除或无权限,操作失败!");
} }
WQLObject wo = WQLObject.getWQLObject("sch_base_point");
JSONObject old = wo.query("point_code='"+dto.getPoint_code()+"' and point_id<>'"+dto.getPoint_id()+"'").uniqueResult(0);
if(old!=null){
throw new BadRequestException("已存在相同编码!");
}
Long currentUserId = SecurityUtils.getCurrentUserId(); Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName(); String nickName = SecurityUtils.getNickName();
@@ -119,9 +130,17 @@ public class PointServiceImpl implements PointService {
dto.setUpdate_optid(currentUserId); dto.setUpdate_optid(currentUserId);
dto.setUpdate_optname(nickName); dto.setUpdate_optname(nickName);
WQLObject wo = WQLObject.getWQLObject("sch_base_point");
JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto)); JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto));
wo.update(json); wo.update(json);
//根据仓位更新点位载具和锁定信息
// 点位基础表【SCH_BASE_Point】
JSONObject param = new JSONObject();
param.put("is_used", dto.getIs_used());
param.put("storagevehicle_code", dto.getVehicle_code());
param.put("lock_type", dto.getLock_type());
WQLObject.getWQLObject("st_ivt_structattr").update(param, "struct_code = '" + dto.getPoint_code() + "'");
} }

View File

@@ -48,7 +48,6 @@ public class TaskServiceImpl implements TaskService {
JSONObject whereJson = JSONObject.parseObject(JSON.toJSONString(form)); JSONObject whereJson = JSONObject.parseObject(JSON.toJSONString(form));
String task_status_old = whereJson.getString("task_status");
String task_status = whereJson.getString("task_status"); String task_status = whereJson.getString("task_status");
String task_status_new = ""; String task_status_new = "";
@@ -89,8 +88,8 @@ public class TaskServiceImpl implements TaskService {
if (StrUtil.isNotEmpty(whereJson.getString("taskdtl_type"))) { if (StrUtil.isNotEmpty(whereJson.getString("taskdtl_type"))) {
map.put("taskdtl_type", whereJson.getString("taskdtl_type")); map.put("taskdtl_type", whereJson.getString("taskdtl_type"));
} }
if (StrUtil.isNotEmpty(whereJson.getString("finishTypeList"))) { if (StrUtil.isNotEmpty(whereJson.getString("finished_type"))) {
map.put("finishTypeList", whereJson.getString("finishTypeList")); map.put("finished_type", whereJson.getString("finished_type"));
} }
if (StrUtil.isNotEmpty(whereJson.getString("begin_time"))) { if (StrUtil.isNotEmpty(whereJson.getString("begin_time"))) {
map.put("begin_time", whereJson.getString("begin_time")); map.put("begin_time", whereJson.getString("begin_time"));

View File

@@ -97,9 +97,6 @@
OPTION 输入.point_status <> "" OPTION 输入.point_status <> ""
point.point_status = 输入.point_status point.point_status = 输入.point_status
ENDOPTION ENDOPTION
OPTION 输入.lock_type = "00"
(point.vehicle_code is null or point.vehicle_code = '')
ENDOPTION
OPTION 输入.is_used <> "" OPTION 输入.is_used <> ""
point.is_used = 输入.is_used point.is_used = 输入.is_used
ENDOPTION ENDOPTION

View File

@@ -41,7 +41,7 @@
> >
<el-form-item label="工艺路线号" prop="processroute_code"> <el-form-item label="工艺路线号" prop="processroute_code">
<el-input <el-input
v-model="form.processroute_code" v-model.trim="form.processroute_code"
:disabled="crud.status.view > 0" :disabled="crud.status.view > 0"
size="mini" size="mini"
style="width: 210px" style="width: 210px"
@@ -50,7 +50,7 @@
</el-form-item> </el-form-item>
<el-form-item label="工艺路线名称" prop="processroute_name"> <el-form-item label="工艺路线名称" prop="processroute_name">
<el-input <el-input
v-model="form.processroute_name" v-model.trim="form.processroute_name"
:disabled="crud.status.view > 0" :disabled="crud.status.view > 0"
size="mini" size="mini"
style="width: 210px" style="width: 210px"

View File

@@ -111,17 +111,6 @@
</div> </div>
<!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'--> <!--如果想在工具栏加入更多按钮可以使用插槽方式 slot = 'left' or 'right'-->
<crudOperation :permission="permission"> <crudOperation :permission="permission">
<el-button
slot="right"
class="filter-item"
type="info"
:loading="syncLoading"
icon="el-icon-refresh"
size="mini"
@click="sync()"
>
仓位同步
</el-button>
<el-button <el-button
slot="right" slot="right"
class="filter-item" class="filter-item"

View File

@@ -105,7 +105,6 @@
<el-option <el-option
v-for="item in finishTypeList" v-for="item in finishTypeList"
:key="item.code" :key="item.code"
clearable
:label="item.name" :label="item.name"
:value="item.code" :value="item.code"
/> />