更新
This commit is contained in:
@@ -50,6 +50,15 @@ public class MaterialServiceImpl implements MaterialService {
|
||||
ResultBean rb = wo.pagequery(WqlUtil.getHttpContext(page), sql + " and is_delete='0'", "update_time desc");
|
||||
final JSONObject json = rb.pageResult();
|
||||
log.info("json:{}", json);
|
||||
JSONArray content = json.getJSONArray("content");
|
||||
//将静置时间从分钟改为小时
|
||||
for (int i = 0; i < content.size(); i++) {
|
||||
JSONObject jo = (JSONObject) content.get(i);
|
||||
Integer stewing_time = jo.getInteger("stewing_time");
|
||||
if (stewing_time != 0) {
|
||||
jo.put("stewing_time",stewing_time/60);
|
||||
}
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
@@ -87,7 +96,8 @@ public class MaterialServiceImpl implements MaterialService {
|
||||
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getNickName();
|
||||
String now = DateUtil.now();
|
||||
|
||||
//将静置时间从小时改为分钟
|
||||
dto.setStewing_time(String.valueOf(Integer.valueOf(dto.getStewing_time())*60));
|
||||
dto.setMaterial_id(IdUtil.getSnowflake(1, 1).nextId());
|
||||
dto.setCreate_id(currentUserId);
|
||||
dto.setCreate_name(nickName);
|
||||
@@ -119,6 +129,8 @@ public class MaterialServiceImpl implements MaterialService {
|
||||
dto.setUpdate_optname(nickName);
|
||||
Long material_uuid = dto.getMaterial_id();
|
||||
String material_code = dto.getMaterial_code();
|
||||
//将静置时间从小时改为分钟
|
||||
dto.setStewing_time(String.valueOf(Integer.valueOf(dto.getStewing_time())*60));
|
||||
WQLObject wo = WQLObject.getWQLObject("md_me_material");
|
||||
JSONObject materialObj = wo.query("material_code='" + material_code + "' and material_id <>'" + material_uuid + "' and is_delete='0'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(materialObj)) {
|
||||
|
||||
Reference in New Issue
Block a user