This commit is contained in:
zds
2022-11-27 18:49:26 +08:00
parent 06fe040d4f
commit 152c72a313
12 changed files with 80 additions and 68 deletions

View File

@@ -61,7 +61,7 @@ public class DevicefaultclassServiceImpl implements DevicefaultclassService {
String classIds = classstandardService.getAllChildIdStr(class_idStr);
map.put("classIds", classIds);
}
JSONObject json = WQL.getWO("QEM_BI_DEVICEFAULTCLASS001").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "mst.create_time DESC");
JSONObject json = WQL.getWO("QEM_BI_DEVICEFAULTCLASS001").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "mst.device_faultclass_code DESC");
return json;
}

View File

@@ -44,7 +44,7 @@ public class WorkProcedureServiceImpl implements WorkProcedureService {
if (!StrUtil.isEmpty(search)) {
where = " AND (workprocedure_code like '%" + search + "%' OR workprocedure_name like '%" + search + "%' ) ";
}
ResultBean rb = wo.pagequery(WqlUtil.getHttpContext(page), "is_delete= '0' " + where, "update_time desc");
ResultBean rb = wo.pagequery(WqlUtil.getHttpContext(page), "is_delete= '0' " + where, "workprocedure_code");
final JSONObject json = rb.pageResult();
return json;
}
@@ -108,13 +108,15 @@ public class WorkProcedureServiceImpl implements WorkProcedureService {
@Transactional(rollbackFor = Exception.class)
public void update(WorkProcedureDto dto) {
WorkProcedureDto entity = this.findById(dto.getWorkprocedure_id());
if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!");
String workprocedure_code = entity.getWorkprocedure_code();
WorkProcedureDto byCode = this.findByCode(workprocedure_code);
if (ObjectUtil.isNotEmpty(byCode) && !dto.getWorkprocedure_id().equals(byCode.getWorkprocedure_id()))
throw new BadRequestException("存在相同的编码!");
if (entity == null) {
throw new BadRequestException("被删除或无权限,操作失败!");
}
WQLObject wo = WQLObject.getWQLObject("pdm_bi_workProcedure");
String workprocedure_code = dto.getWorkprocedure_code();
JSONObject old = wo.query("is_delete='0' and workprocedure_code='"+workprocedure_code+"' and workprocedure_id<>'"+dto.getWorkprocedure_id()+"'").uniqueResult(0);
if(old!=null){
throw new BadRequestException("存在相同的编码!");
}
Long currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getNickName();
@@ -123,7 +125,6 @@ public class WorkProcedureServiceImpl implements WorkProcedureService {
dto.setUpdate_optid(currentUserId);
dto.setUpdate_optname(nickName);
WQLObject wo = WQLObject.getWQLObject("pdm_bi_workProcedure");
JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto));
wo.update(json);
}

View File

@@ -83,8 +83,12 @@ public class ReceivemstServiceImpl implements ReceivemstService {
}
HashMap<String, String> map = new HashMap<>();
map.put("flag", "1");
map.put("begin_time", begin_time);
map.put("end_time", end_time);
if (StrUtil.isNotEmpty(begin_time)) {
map.put("begin_time", begin_time.substring(0,10));
}
if (StrUtil.isNotEmpty(end_time)) {
map.put("end_time", end_time.substring(0,10));
}
map.put("vbillcode", vbillcode);
map.put("receive_code", receive_code);
map.put("supp_code", supp_code);

View File

@@ -60,7 +60,11 @@ public class FactoryCalendarServiceImpl implements FactoryCalendarService {
String now = DateUtil.now();
JwtUserDto currentUser = (JwtUserDto) SecurityUtils.getCurrentUser();
Long deptId = currentUser.getDeptId();
WQLObject mstTab = WQLObject.getWQLObject("pdm_bi_factorycalendar"); // 工艺路线主表
JSONObject old = mstTab.query("is_delete='0' and factorycalendar_code='"+whereJson.getString("factorycalendar_code")+"'").uniqueResult(0);
if(old!=null){
throw new BadRequestException("已存在相同编码的工厂日历!");
}
//插入主表
String factorycalendar_id = IdUtil.getSnowflake(1, 1).nextId() + "";
whereJson.put("factorycalendar_id", factorycalendar_id);
@@ -81,6 +85,11 @@ public class FactoryCalendarServiceImpl implements FactoryCalendarService {
@Transactional(rollbackFor = Exception.class)
public void update(JSONObject whereJson) {
String factorycalendar_id = whereJson.getString("factorycalendar_id");
WQLObject mstTab = WQLObject.getWQLObject("pdm_bi_factorycalendar"); // 工艺路线主表
JSONObject old = mstTab.query("is_delete='0' and factorycalendar_code='"+whereJson.getString("factorycalendar_code")+"' and factorycalendar_id<>'"+whereJson.getString("factorycalendar_id")+"'").uniqueResult(0);
if(old!=null){
throw new BadRequestException("已存在相同编码的工厂日历!");
}
//查询旧的终止年份
JSONObject old_jo = WQLObject.getWQLObject("PDM_BI_FactoryCalendar").query("factorycalendar_id = '" + factorycalendar_id + "'").uniqueResult(0);

View File

@@ -117,6 +117,14 @@ public class CheckOutBillServiceImpl implements CheckOutBillService {
if (StrUtil.isNotEmpty(map.get("remark"))) {
map.put("remark", "%" + map.get("remark") + "%");
}
String begin_time = map.get("begin_time");
String end_time = map.get("end_time");
if (StrUtil.isNotEmpty(begin_time)) {
map.put("begin_time", begin_time.substring(0,10));
}
if (StrUtil.isNotEmpty(end_time)) {
map.put("end_time", end_time.substring(0,10));
}
JSONObject jo = WQL.getWO("QST_IVT_CHECKOUTBILL").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "mb.material_code");
return jo;
}