Browse Source

将入库相关处理抽离

lwx_dev
erdanergou 3 years ago
parent
commit
49b6af1257
  1. 4
      src/main/java/com/dreamchaser/depository_manage/service/impl/DepositoryRecordServiceImpl.java
  2. 6
      src/main/resources/templates/pages/application/application-in.html
  3. 3
      src/main/resources/templates/pages/application/application-in_back.html
  4. 3
      src/main/resources/templates/pages/application/application-in_scanQrCode.html
  5. 6
      src/main/resources/templates/pages/application/application-out.html
  6. 3
      src/main/resources/templates/pages/application/application-out_back.html
  7. 3
      src/main/resources/templates/pages/application/application-out_scanQrCode.html
  8. 3
      src/main/resources/templates/pages/application/application-transfer.html
  9. 3
      src/main/resources/templates/pages/application/application-transfer_back.html
  10. 6
      src/test/java/com/dreamchaser/depository_manage/TestOther.java

4
src/main/java/com/dreamchaser/depository_manage/service/impl/DepositoryRecordServiceImpl.java

@ -107,7 +107,6 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService {
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public Integer applicationIn(Map<String, Object> map) { public Integer applicationIn(Map<String, Object> map) {
Boolean flagForApproval = ObjectFormatUtil.toBoolean(map.get("flagForApproval")); Boolean flagForApproval = ObjectFormatUtil.toBoolean(map.get("flagForApproval"));
Integer depositoryId = ObjectFormatUtil.toInteger(map.get("depositoryId")); Integer depositoryId = ObjectFormatUtil.toInteger(map.get("depositoryId"));
Depository depositoryRecordById = depositoryMapper.findDepositoryById(depositoryId); Depository depositoryRecordById = depositoryMapper.findDepositoryById(depositoryId);
Map<String, Object> temp = new HashMap<>(); Map<String, Object> temp = new HashMap<>();
@ -666,6 +665,9 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService {
Integer result = updateInventoryInfoForApproval(map, quantity, materialById, placeById); Integer result = updateInventoryInfoForApproval(map, quantity, materialById, placeById);
map.remove("applicationInId"); map.remove("applicationInId");
return result; return result;
}else{
map.put("applicationInId",map.get("id"));
map.remove("id");
} }
return integer; return integer;
} else { } else {

6
src/main/resources/templates/pages/application/application-in.html

@ -699,6 +699,7 @@
var req = {}; var req = {};
req.code = code; req.code = code;
req.type = "in"; req.type = "in";
if(code !== ""){
$.ajax({ $.ajax({
url: "/material/findMatrialByCode", url: "/material/findMatrialByCode",
type: "get", type: "get",
@ -766,6 +767,8 @@
} }
} }
}); });
}
}; };
// 用于实现点击搜索按钮 // 用于实现点击搜索按钮
@ -1255,6 +1258,7 @@
// gname // gname
let gnameItem = gnameParent.childNodes[1].childNodes[1]; let gnameItem = gnameParent.childNodes[1].childNodes[1];
let req = {}; let req = {};
if(code !== ""){
req.code = code; req.code = code;
$.ajax({ $.ajax({
url: "/group/findGroupByCodeForIn", url: "/group/findGroupByCodeForIn",
@ -1299,6 +1303,8 @@
} }
} }
}); });
}
}; };
// 用于实现点击搜索按钮(组合) // 用于实现点击搜索按钮(组合)

3
src/main/resources/templates/pages/application/application-in_back.html

@ -158,6 +158,7 @@
var req = {}; var req = {};
req.code = code; req.code = code;
req.type = "in"; req.type = "in";
if(code !== ""){
$.ajax({ $.ajax({
url: "/material/findMatrialByCode", url: "/material/findMatrialByCode",
type: "get", type: "get",
@ -177,6 +178,8 @@
} }
} }
}); });
}
}); });
$("#openSonByMaterial").blur(function () { $("#openSonByMaterial").blur(function () {

3
src/main/resources/templates/pages/application/application-in_scanQrCode.html

@ -611,6 +611,7 @@
var req = {}; var req = {};
req.code = code; req.code = code;
req.type = "in"; req.type = "in";
if(code !== ""){
$.ajax({ $.ajax({
url: "/material/findMatrialByCode", url: "/material/findMatrialByCode",
type: "get", type: "get",
@ -671,6 +672,8 @@
} }
} }
}); });
}
}; };
// 用于实现点击搜索按钮 // 用于实现点击搜索按钮

6
src/main/resources/templates/pages/application/application-out.html

@ -762,6 +762,7 @@
var req = {}; var req = {};
req.code = code; req.code = code;
req.type = "out"; req.type = "out";
if(code !== ""){
$.ajax({ $.ajax({
url: "/material/findMatrialByCode", url: "/material/findMatrialByCode",
type: "get", type: "get",
@ -821,6 +822,8 @@
} }
} }
}); });
}
}; };
// 用于实现通过编码查询组合 // 用于实现通过编码查询组合
@ -840,6 +843,7 @@
let gnameItem = gnameParent.childNodes[1].childNodes[1]; let gnameItem = gnameParent.childNodes[1].childNodes[1];
let req = {}; let req = {};
req.code = code; req.code = code;
if(code !== ""){
$.ajax({ $.ajax({
url: "/group/findGroupByCode", url: "/group/findGroupByCode",
type: "post", type: "post",
@ -883,6 +887,8 @@
} }
} }
}); });
}
}; };
// 用于实现点击搜索按钮 // 用于实现点击搜索按钮

3
src/main/resources/templates/pages/application/application-out_back.html

@ -156,6 +156,7 @@
var req = {}; var req = {};
req.code = code; req.code = code;
req.type = "out"; req.type = "out";
if(code !== ""){
$.ajax({ $.ajax({
url: "/material/findMatrialByCode", url: "/material/findMatrialByCode",
type: "get", type: "get",
@ -182,6 +183,8 @@
} }
} }
}) })
}
}); });
$("#mname").blur(function () { $("#mname").blur(function () {

3
src/main/resources/templates/pages/application/application-out_scanQrCode.html

@ -448,6 +448,7 @@
var req = {}; var req = {};
req.code = code; req.code = code;
req.type = "out"; req.type = "out";
if(code !== ""){
$.ajax({ $.ajax({
url: "/material/findMatrialByCode", url: "/material/findMatrialByCode",
type: "get", type: "get",
@ -484,6 +485,8 @@
} }
} }
}); });
}
}; };
// 用于实现点击搜索按钮 // 用于实现点击搜索按钮

3
src/main/resources/templates/pages/application/application-transfer.html

@ -610,6 +610,7 @@
var req = {}; var req = {};
req.code = code; req.code = code;
req.type = "out"; req.type = "out";
if(code !== ""){
$.ajax({ $.ajax({
url: "/material/findMatrialByCode", url: "/material/findMatrialByCode",
type: "get", type: "get",
@ -682,6 +683,8 @@
} }
} }
}); });
}
}; };
// 用于实现点击搜索按钮 // 用于实现点击搜索按钮

3
src/main/resources/templates/pages/application/application-transfer_back.html

@ -330,6 +330,7 @@
var req = {}; var req = {};
req.code = code; req.code = code;
req.type = "out"; req.type = "out";
if(code !== ""){
$.ajax({ $.ajax({
url: "/material/findMatrialByCode", url: "/material/findMatrialByCode",
type: "get", type: "get",
@ -364,6 +365,8 @@
} }
} }
}); });
}
}; };
// 用于实现点击搜索按钮 // 用于实现点击搜索按钮

6
src/test/java/com/dreamchaser/depository_manage/TestOther.java

@ -31,7 +31,11 @@ public class TestOther {
@Test @Test
public void Test() throws IOException { public void Test() throws IOException {
System.out.println(ObjectFormatUtil.toBoolean("true")); Map<String,Object> map = new HashMap<>();
Boolean flag = true;
map.put("flag",flag);
Boolean flag1 = ObjectFormatUtil.toBoolean(map.get("flag"));
System.out.println(flag1);
} }

Loading…
Cancel
Save