Browse Source

添加Object转List、Map的方法并添加获取物料在某个时间段内的出入库数量及总额

lwx_dev
erdanergou 2 years ago
parent
commit
ec064eb339
  1. 6
      src/main/java/com/dreamchaser/depository_manage/controller/CompanyController.java
  2. 33
      src/main/java/com/dreamchaser/depository_manage/controller/DepositoryController.java
  3. 32
      src/main/java/com/dreamchaser/depository_manage/controller/DepositoryRecordController.java
  4. 21
      src/main/java/com/dreamchaser/depository_manage/controller/PageController.java
  5. 11
      src/main/java/com/dreamchaser/depository_manage/mapper/DepositoryRecordMapper.java
  6. 24
      src/main/java/com/dreamchaser/depository_manage/mapper/DepositoryRecordMapper.xml
  7. 5
      src/main/java/com/dreamchaser/depository_manage/pojo/AdministrationP.java
  8. 5
      src/main/java/com/dreamchaser/depository_manage/pojo/InventoryByMTAndDepository.java
  9. 13
      src/main/java/com/dreamchaser/depository_manage/service/DepositoryRecordService.java
  10. 59
      src/main/java/com/dreamchaser/depository_manage/service/impl/DepositoryRecordServiceImpl.java
  11. 6
      src/main/java/com/dreamchaser/depository_manage/utils/CollectionUtil.java
  12. 1
      src/main/java/com/dreamchaser/depository_manage/utils/CrudUtil.java
  13. 62
      src/main/java/com/dreamchaser/depository_manage/utils/DateUtil.java
  14. 44
      src/main/java/com/dreamchaser/depository_manage/utils/ObjectFormatUtil.java
  15. 2
      src/main/resources/templates/pages/application/application-in_back.html
  16. 163
      src/main/resources/templates/pages/depository/Inventory-view_back.html
  17. 67
      src/test/java/com/dreamchaser/depository_manage/LineChartForInventoryTest.java
  18. 43
      src/test/java/com/dreamchaser/depository_manage/SomeTest.java
  19. 24
      target/classes/com/dreamchaser/depository_manage/mapper/DepositoryRecordMapper.xml
  20. 2
      target/classes/static/js/stockTaking/stockTakingForLocationTable.js
  21. 2
      target/classes/static/js/stockTaking/stockTakingForMaterial.js
  22. 10
      target/classes/templates/pages/BusinessType/businesstype_out.html
  23. 2
      target/classes/templates/pages/application/application-in_back.html
  24. 2
      target/classes/templates/pages/application/application-out_min.html
  25. 4
      target/classes/templates/pages/application/application_multi.html
  26. 4
      target/classes/templates/pages/authorization/depositoryOpen.html
  27. 2
      target/classes/templates/pages/company/company-out.html
  28. 4
      target/classes/templates/pages/company/company-out_back.html
  29. 2
      target/classes/templates/pages/company/companyByParentId.html
  30. 10
      target/classes/templates/pages/constructionunit/constructionunit_out.html
  31. 4
      target/classes/templates/pages/depository/table-in.html
  32. 5
      target/classes/templates/pages/depository/table-out.html
  33. 57
      target/classes/templates/pages/depository/table-stock.html
  34. 6
      target/classes/templates/pages/group/application_multi.html
  35. 6
      target/classes/templates/pages/group/group-add.html
  36. 22
      target/classes/templates/pages/group/group-out.html
  37. 8
      target/classes/templates/pages/group/group_edit.html
  38. 16
      target/classes/templates/pages/material/material-out.html
  39. 2
      target/classes/templates/pages/material/material-out_mobile.html
  40. 6
      target/classes/templates/pages/materialBarCode/materialBarCode_out.html
  41. 12
      target/classes/templates/pages/materialtype/materialTypeByParentId.html
  42. 22
      target/classes/templates/pages/materialtype/materialType_view.html
  43. 12
      target/classes/templates/pages/notice/notice-out.html
  44. 8
      target/classes/templates/pages/notice/notice-out_user.html
  45. 2
      target/classes/templates/pages/post/post-out.html
  46. 2
      target/classes/templates/pages/post/postRole.html
  47. 16
      target/classes/templates/pages/split/split-out.html
  48. 2
      target/classes/templates/pages/stockTaking/stockTakingForTable.html
  49. 2
      target/classes/templates/pages/user/table-user.html
  50. 2
      target/classes/templates/pages/user/userRole.html
  51. 2
      target/classes/templates/pages/user/userRoleForIn.html
  52. 26
      target/classes/templates/pages/warehouse/depository-out.html
  53. 8
      target/classes/templates/pages/warehouse/warehouseByParentId.html

6
src/main/java/com/dreamchaser/depository_manage/controller/CompanyController.java

@ -345,9 +345,9 @@ public class CompanyController {
return CrudUtil.insertHandle(success, roleAndDepositoryByCondition.size()); return CrudUtil.insertHandle(success, roleAndDepositoryByCondition.size());
} else if (map.containsKey("depositoryIds")) { } else if (map.containsKey("depositoryIds")) {
Integer num = 0; Integer num = 0;
List<Integer> depositoryIds = (List<Integer>) map.get("depositoryIds"); List<Integer> depositoryIds = ObjectFormatUtil.objToList(map.get("depositoryIds"),Integer.class);
Integer success = 0; Integer success = 0;
Integer total = 0; int total = 0;
for (Integer depositoryId : depositoryIds) { for (Integer depositoryId : depositoryIds) {
Map<String, Object> param = new HashMap<>(); Map<String, Object> param = new HashMap<>();
param.put("depositoryId", depositoryId); param.put("depositoryId", depositoryId);
@ -553,7 +553,7 @@ public class CompanyController {
// 如果删除多个 // 如果删除多个
// 获取要删除的id // 获取要删除的id
List<Object> ids = (List<Object>) map.get("ids"); List<Object> ids = ObjectFormatUtil.objToList(map.get("ids"),Object.class);
count = ids.size(); count = ids.size();
map.remove("ids"); map.remove("ids");
for (Object id : ids for (Object id : ids

33
src/main/java/com/dreamchaser/depository_manage/controller/DepositoryController.java

@ -113,7 +113,7 @@ public class DepositoryController {
List<Depository> list = depositoryService.findDepositoryByCondition(map, userKey, token); List<Depository> list = depositoryService.findDepositoryByCondition(map, userKey, token);
// 获取所有行政单位 // 获取所有行政单位
Map<String, Object> administration = PublicConfig.findAdministration(userKey, token); Map<String, Object> administration = PublicConfig.findAdministration(userKey, token);
List<AdministrationP> administrationPList = (List<AdministrationP>) administration.get("administrationPList"); List<AdministrationP> administrationPList = ObjectFormatUtil.objToList(administration.get("administrationPList"), AdministrationP.class);
Integer total = (Integer) administration.get("total"); Integer total = (Integer) administration.get("total");
for (int i = 0; i < list.size(); i++) { for (int i = 0; i < list.size(); i++) {
for (int j = 0; j < administrationPList.size(); j++) { for (int j = 0; j < administrationPList.size(); j++) {
@ -149,7 +149,7 @@ public class DepositoryController {
HandlesOtherFunctionalThreadPool.execute(() -> RealDeleteSonDepository(id.toString(), finalUserKey, finalToken)); HandlesOtherFunctionalThreadPool.execute(() -> RealDeleteSonDepository(id.toString(), finalUserKey, finalToken));
return CrudUtil.deleteHandle(depositoryService.deleteDepositoryRecordById(id), 1); return CrudUtil.deleteHandle(depositoryService.deleteDepositoryRecordById(id), 1);
} else if (map.containsKey("ids")) { } else if (map.containsKey("ids")) {
List<Integer> ids = (List<Integer>) map.get("ids"); List<Integer> ids = ObjectFormatUtil.objToList(map.get("ids"),Integer.class);
for (Integer integer : ids) { for (Integer integer : ids) {
String id = integer.toString(); String id = integer.toString();
HandlesOtherFunctionalThreadPool.execute(() -> RealDeleteSonDepository(id, finalUserKey, finalToken)); HandlesOtherFunctionalThreadPool.execute(() -> RealDeleteSonDepository(id, finalUserKey, finalToken));
@ -239,7 +239,7 @@ public class DepositoryController {
return CrudUtil.deleteHandle(depositoryService.changeStateToDeletedById(id), 1); return CrudUtil.deleteHandle(depositoryService.changeStateToDeletedById(id), 1);
} else if (map.containsKey("ids")) { } else if (map.containsKey("ids")) {
List<Integer> ids = (List<Integer>) map.get("ids"); List<Integer> ids = ObjectFormatUtil.objToList(map.get("ids"),Integer.class);
for (Integer integer : ids) { for (Integer integer : ids) {
String id = integer.toString(); String id = integer.toString();
HandlesOtherFunctionalThreadPool.execute(() -> UpdateSonState(id, 3, true, finalUserKey, finalToken)); HandlesOtherFunctionalThreadPool.execute(() -> UpdateSonState(id, 3, true, finalUserKey, finalToken));
@ -332,8 +332,8 @@ public class DepositoryController {
// 获取本月及之前月份各种类别入/出库总量 // 获取本月及之前月份各种类别入/出库总量
List<MaterialType> materialTypeAll = materialTypeService.findMaterialTypeNoParent(); List<MaterialType> materialTypeAll = materialTypeService.findMaterialTypeNoParent();
Map<String, Object> previousMonth = DateUtil.getPreviousMonth(); Map<String, Object> previousMonth = DateUtil.getPreviousMonth();
List<Object> months = (List<Object>) previousMonth.get("months"); List<Object> months = ObjectFormatUtil.objToList(previousMonth.get("months"),Object.class);
List<Object> sourceList = (List<Object>) previousMonth.get("sourceList"); List<Object> sourceList = ObjectFormatUtil.objToList(previousMonth.get("sourceList"),Object.class);
for (int num = 0; num < months.size() - 1; num++) { for (int num = 0; num < months.size() - 1; num++) {
for (MaterialType materialType : materialTypeAll) { for (MaterialType materialType : materialTypeAll) {
Map<String, Object> parm = new HashMap<>(); Map<String, Object> parm = new HashMap<>();
@ -427,8 +427,7 @@ public class DepositoryController {
show_data.putAll((Map<?, ?>) result); show_data.putAll((Map<?, ?>) result);
} }
depository_data.put("data", show_data); depository_data.put("data", show_data);
} } else {
else {
// 每天各仓库入库数目 // 每天各仓库入库数目
while (it.hasNext()) { while (it.hasNext()) {
Object next = it.next(); Object next = it.next();
@ -584,7 +583,7 @@ public class DepositoryController {
e.printStackTrace(); e.printStackTrace();
} }
if (sunburstChartData == null || sunburstChartData.size() == 0) { if (sunburstChartData == null || sunburstChartData.size() == 0) {
sunburstChartData = (List<Object>) ((Map<String, Object>) result).get("sunburstChartDataForInventory"); sunburstChartData = ObjectFormatUtil.objToList(((Map<String, Object>) result).get("sunburstChartDataForInventory"),Object.class);
} }
if (lineChartData == null || lineChartData.size() == 0) { if (lineChartData == null || lineChartData.size() == 0) {
lineChartData = (Map<Object, Object>) ((Map<String, Object>) result).get("inventoryLineChartData"); lineChartData = (Map<Object, Object>) ((Map<String, Object>) result).get("inventoryLineChartData");
@ -599,8 +598,7 @@ public class DepositoryController {
} }
} } else {
else {
// 获取本周至今仓库的入/出库数量 // 获取本周至今仓库的入/出库数量
Future<Object> futureForBarChartData = completionService.submit(new distributeTasks(depositoryAllNameAndId, type, 1, userByPort, depositoryName)); Future<Object> futureForBarChartData = completionService.submit(new distributeTasks(depositoryAllNameAndId, type, 1, userByPort, depositoryName));
@ -717,9 +715,9 @@ public class DepositoryController {
// 获取本月之前的月份 // 获取本月之前的月份
Map<String, Object> previousMonth = DateUtil.getPreviousMonth(); Map<String, Object> previousMonth = DateUtil.getPreviousMonth();
// 获取月份的时间戳 // 获取月份的时间戳
List<Object> months = (List<Object>) previousMonth.get("months"); List<Object> months = ObjectFormatUtil.objToList(previousMonth.get("months"),Object.class);
// 获取月份名称 // 获取月份名称
List<Object> sourceList = (List<Object>) previousMonth.get("sourceList"); List<Object> sourceList = ObjectFormatUtil.objToList(previousMonth.get("sourceList"),Object.class);
// 结果集 // 结果集
List<Future<Object>> futureList = new ArrayList<Future<Object>>(); List<Future<Object>> futureList = new ArrayList<Future<Object>>();
int threadSize = months.size(); int threadSize = months.size();
@ -758,9 +756,9 @@ public class DepositoryController {
public List<Object> getInventorySunburstData(UserByPort userByPort) { public List<Object> getInventorySunburstData(UserByPort userByPort) {
Map<String, Object> previousMonth = DateUtil.getPreviousMonth(); Map<String, Object> previousMonth = DateUtil.getPreviousMonth();
// 获取所有月份 // 获取所有月份
List<Object> months = (List<Object>) previousMonth.get("months"); List<Object> months = ObjectFormatUtil.objToList(previousMonth.get("months"),Object.class);
// 获取月份名称 // 获取月份名称
List<Object> sourceList = (List<Object>) previousMonth.get("sourceList"); List<Object> sourceList = ObjectFormatUtil.objToList((List<Object>) previousMonth.get("sourceList"),Object.class);
Calendar instance = Calendar.getInstance(); Calendar instance = Calendar.getInstance();
instance.add(Calendar.MONTH, 1); instance.add(Calendar.MONTH, 1);
instance.set(Calendar.DATE, 1); instance.set(Calendar.DATE, 1);
@ -808,9 +806,9 @@ public class DepositoryController {
try { try {
obj = completionService.take().get(); obj = completionService.take().get();
Map<String, Object> objectMap = (Map<String, Object>) obj; Map<String, Object> objectMap = ObjectFormatUtil.objToMap(obj,String.class,Object.class);
Integer id = ObjectFormatUtil.toInteger((objectMap).get("id")); Integer id = ObjectFormatUtil.toInteger((objectMap).get("id"));
List<InventoryByMTAndDepository> inventoryByMtAndD = (List<InventoryByMTAndDepository>) objectMap.get("inventoryByMtAndD"); List<InventoryByMTAndDepository> inventoryByMtAndD = ObjectFormatUtil.objToList(objectMap.get("inventoryByMtAndD"),InventoryByMTAndDepository.class);
value += ObjectFormatUtil.toDouble(objectMap.get("value")); value += ObjectFormatUtil.toDouble(objectMap.get("value"));
inventoryForMTAndDepository.put(id, inventoryByMtAndD); inventoryForMTAndDepository.put(id, inventoryByMtAndD);
(objectMap).remove("id"); (objectMap).remove("id");
@ -1346,8 +1344,7 @@ public class DepositoryController {
map.put("data", doubleList); map.put("data", doubleList);
show_data.put(val, map); show_data.put(val, map);
} }
} } else {
else {
// 获取日期 // 获取日期
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
int now = instance.get(Calendar.DAY_OF_WEEK) - 1 == 0 ? 7 : instance.get(Calendar.DAY_OF_WEEK) - 1; int now = instance.get(Calendar.DAY_OF_WEEK) - 1 == 0 ? 7 : instance.get(Calendar.DAY_OF_WEEK) - 1;

32
src/main/java/com/dreamchaser/depository_manage/controller/DepositoryRecordController.java

@ -2301,5 +2301,37 @@ public class DepositoryRecordController {
} }
} }
/**
* 用于获取当前物料的本月出入库记录
*
* @param jsonObject 带查询数据
*/
@PostMapping("/getApplicationForMaterial")
public RestResponse getInventoryApplication(@RequestBody JSONObject jsonObject) {
Integer id = jsonObject.getInteger("id");
// 获取本月至今的日期
Map<String, Object> monthBeginToNow = DateUtil.getMonthBeginToNow();
// 获取至今的日期名称
List<String> dayNames = ObjectFormatUtil.objToList(monthBeginToNow.get("dayName"), String.class);
// 获取至今的日期时间戳
List<Long> dayTimeSpaces = ObjectFormatUtil.objToList(monthBeginToNow.get("dayTimeSpace"), Long.class);
// 获取当前物料的入库总额与数量
Map<String, List<Double>> resultForApplicationIn = depositoryRecordService.getApplicationByMaterial(id, dayTimeSpaces, 1);
List<Double> amountListForIn = resultForApplicationIn.get("amountList");
List<Double> countListForIn = resultForApplicationIn.get("countList");
// 获取当前物料的出库总额与数量
Map<String, List<Double>> resultForApplicationOut = depositoryRecordService.getApplicationByMaterial(id, dayTimeSpaces, 2);
List<Double> amountListForOut = resultForApplicationOut.get("amountList");
List<Double> countListForOut = resultForApplicationOut.get("countList");
Map<String, Object> result = new HashMap<>();
result.put("applicationInAmount", amountListForIn);
result.put("applicationInCount", countListForIn);
result.put("applicationOutAmount", amountListForOut);
result.put("applicationOutCount", countListForOut);
result.put("dayNames", dayNames);
return new RestResponse(result);
}
} }

21
src/main/java/com/dreamchaser/depository_manage/controller/PageController.java

@ -842,15 +842,15 @@ public class PageController {
* @return * @return
*/ */
@GetMapping("/application_in_back") @GetMapping("/application_in_back")
public ModelAndView applicationIn(Integer mid, Integer depositoryId) { public ModelAndView applicationIn(Integer mid, Integer depositoryId, Integer placeId) {
ModelAndView mv = new ModelAndView(); ModelAndView mv = new ModelAndView();
Inventory materialById = new Inventory(); InventoryP materialById = new InventoryP();
Depository depositoryRecordById = new Depository(); Depository depositoryById = new Depository();
if (mid != null) { if (mid != null) {
materialById = materialService.findInventoryById(mid); materialById = new InventoryP(materialService.findInventoryById(mid));
} }
if (depositoryId != null) { if (depositoryId != null) {
depositoryRecordById = depositoryService.findDepositoryById(depositoryId); depositoryById = depositoryService.findDepositoryById(depositoryId);
} }
if (materialById.getShelfLife() == null) { if (materialById.getShelfLife() == null) {
mv.addObject("display", "none"); mv.addObject("display", "none");
@ -858,7 +858,16 @@ public class PageController {
List<SplitInfo> splitInfoByMid = splitUnitService.findSplitInfoByMid(materialById.getMid()); List<SplitInfo> splitInfoByMid = splitUnitService.findSplitInfoByMid(materialById.getMid());
materialById.setSplitInfoList(splitInfoByMid); materialById.setSplitInfoList(splitInfoByMid);
mv.addObject("materialById", materialById); mv.addObject("materialById", materialById);
mv.addObject("depository", depositoryRecordById); if (placeId == null) {
placeId = 0;
} else {
Place placeById = placeService.findPlaceById(placeId);
if (placeById != null) {
depositoryById.setDname(depositoryById.getDname() + "-" + placeById.getCode());
}
}
mv.addObject("depository", depositoryById);
mv.addObject("placeId", placeId);
mv.setViewName("pages/application/application-in_back"); mv.setViewName("pages/application/application-in_back");
return mv; return mv;
} }

11
src/main/java/com/dreamchaser/depository_manage/mapper/DepositoryRecordMapper.java

@ -215,10 +215,17 @@ public interface DepositoryRecordMapper {
/** /**
* 根据条件获取月份中入库物料的总额 * 根据条件获取月份中入库物料的总额
* @param map * @param map 查询条件
* @return
*/
Integer findApplicationInByDateAndMaterial(Map<String,Object> map);
/**
* 根据条件获取月份中出库物料的总额
* @param map 查询条件
* @return * @return
*/ */
Integer findApplicationInByMonth(Map<String,Object> map); Integer findApplicationOutByDateAndMaterial(Map<String, Object>map);
Integer findApplicationInByMonthTest(Map<String,Object> map); Integer findApplicationInByMonthTest(Map<String,Object> map);

24
src/main/java/com/dreamchaser/depository_manage/mapper/DepositoryRecordMapper.xml

@ -326,12 +326,14 @@
FROM applicationOutRecordInfo WHERE 1=1 FROM applicationOutRecordInfo WHERE 1=1
<if test='isDone == "0"'> <if test='isDone == "0"'>
and (departmentHeadTime = 0 and FIND_IN_SET(#{userId},departmenthead) != 0 and DepartmentheadPass = 3) and (departmentHeadTime = 0 and FIND_IN_SET(#{userId},departmenthead) != 0 and DepartmentheadPass = 3)
or (depositoryManagerTime = 0 and FIND_IN_SET(#{userId},depositoryManager) != 0 and depositoryManagerPass =3) or (depositoryManagerTime = 0 and FIND_IN_SET(#{userId},depositoryManager) != 0 and depositoryManagerPass
=3)
OR ( balancePosterTime = 0 AND FIND_IN_SET( #{userId}, balancePoster ) != 0 AND balancePosterPass = 3 ) OR ( balancePosterTime = 0 AND FIND_IN_SET( #{userId}, balancePoster ) != 0 AND balancePosterPass = 3 )
</if> </if>
<if test='isDone == "1"'> <if test='isDone == "1"'>
and (departmentHeadTime != 0 and FIND_IN_SET(#{userId},departmenthead) != 0 and DepartmentheadPass != 3) and (departmentHeadTime != 0 and FIND_IN_SET(#{userId},departmenthead) != 0 and DepartmentheadPass != 3)
or (depositoryManagerTime != 0 and FIND_IN_SET(#{userId},depositoryManager) != 0 and depositoryManagerPass != 3) or (depositoryManagerTime != 0 and FIND_IN_SET(#{userId},depositoryManager) != 0 and depositoryManagerPass
!= 3)
OR ( balancePosterTime != 0 AND FIND_IN_SET( #{userId}, balancePoster ) != 0 AND balancePosterPass != 3 ) OR ( balancePosterTime != 0 AND FIND_IN_SET( #{userId}, balancePoster ) != 0 AND balancePosterPass != 3 )
</if> </if>
group by aorid group by aorid
@ -1739,7 +1741,7 @@
</select> </select>
<!-- 获取某月某物料入库总额--> <!-- 获取某月某物料入库总额-->
<select id="findApplicationInByMonth" parameterType="map" resultType="int"> <select id="findApplicationInByDateAndMaterial" parameterType="map" resultType="int">
select ifnull(sum(quantity),0) select ifnull(sum(quantity),0)
from applicationinrecordinfo from applicationinrecordinfo
where 1 = 1 where 1 = 1
@ -1753,6 +1755,22 @@
<if test="typeId != null and typeId != ''"> <if test="typeId != null and typeId != ''">
and mtid = #{typeId} and mtid = #{typeId}
</if> </if>
<if test="mid != null and mid != ''">
and mid = #{mid}
</if>
</select>
<select id="findApplicationOutByDateAndMaterial" parameterType="map" resultType="int">
select ifnull(sum(aorquantity),0)
from applicationoutrecordinfo
where 1 = 1
and applicantTime between #{start} and #{end}
<if test="mid != null and mid != ''">
and mid = #{mid}
</if>
<if test="state == 1 or state == 4">
and depositoryManagerPass in (1,4)
</if>
</select> </select>
<select id="findApplicationInByMonthTest" parameterType="map" resultType="int"> <select id="findApplicationInByMonthTest" parameterType="map" resultType="int">

5
src/main/java/com/dreamchaser/depository_manage/pojo/AdministrationP.java

@ -3,9 +3,12 @@ package com.dreamchaser.depository_manage.pojo;
import com.dreamchaser.depository_manage.entity.Administration; import com.dreamchaser.depository_manage.entity.Administration;
import lombok.Data; import lombok.Data;
import java.io.Serializable;
@Data @Data
public class AdministrationP { public class AdministrationP implements Serializable {
private static final long serialVersionUID = 9106345045588863742L;
/** /**
* id * id
*/ */

5
src/main/java/com/dreamchaser/depository_manage/pojo/InventoryByMTAndDepository.java

@ -2,8 +2,11 @@ package com.dreamchaser.depository_manage.pojo;
import lombok.Data; import lombok.Data;
import java.io.Serializable;
@Data @Data
public class InventoryByMTAndDepository { public class InventoryByMTAndDepository implements Serializable {
private static final long serialVersionUID = 8050571915914604633L;
// 类型id // 类型id
private Long mtId; private Long mtId;
// 仓库id // 仓库id

13
src/main/java/com/dreamchaser/depository_manage/service/DepositoryRecordService.java

@ -479,4 +479,17 @@ public interface DepositoryRecordService {
* 删除出错的出库数据 * 删除出错的出库数据
*/ */
void clearOutBadData(); void clearOutBadData();
/**
* 获取当前物料在指定日期范围内的出\入库金额与数量
* @param id 待查询物料id
* @param days 查询日期范围
* @param type 查询类型 1入库2出库
* @return
*/
Map<String,List<Double>> getApplicationByMaterial(Integer id, List<Long> days,Integer type);
} }

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

@ -3,7 +3,6 @@ package com.dreamchaser.depository_manage.service.impl;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.dreamchaser.depository_manage.config.PublicConfig; import com.dreamchaser.depository_manage.config.PublicConfig;
import com.dreamchaser.depository_manage.config.QyWxConfig; import com.dreamchaser.depository_manage.config.QyWxConfig;
import com.dreamchaser.depository_manage.config.QyWx_approval_template.Approval_template_approver;
import com.dreamchaser.depository_manage.entity.*; import com.dreamchaser.depository_manage.entity.*;
import com.dreamchaser.depository_manage.entity.MaterialAndPlace; import com.dreamchaser.depository_manage.entity.MaterialAndPlace;
import com.dreamchaser.depository_manage.mapper.*; import com.dreamchaser.depository_manage.mapper.*;
@ -2066,6 +2065,64 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService {
} }
} }
/**
* 获取当前物料在指定日期范围内的出\入库金额与数量
*
* @param id 待查询物料id
* @param days 查询日期范围
* @param type 查询类型 1入库2出库
* @return
*/
@Override
public Map<String, List<Double>> getApplicationByMaterial(Integer id, List<Long> days, Integer type) {
// 声明结果集
Map<String, List<Double>> result = new HashMap<>();
// 声明总数列表
List<Double> countList = new ArrayList<>();
// 声明总额列表
List<Double> amountList = new ArrayList<>();
// 获取对应物料
Inventory inventoryById = materialMapper.findInventoryById(id);
// 声明用于查询的map
Map<String, Object> paramForSelect = new HashMap<>();
if (type == 1) {
paramForSelect.put("mid", inventoryById.getMid());
} else {
paramForSelect.put("mid", inventoryById.getId());
}
for (int i = 0; i < days.size() - 1; i++) {
// 设置开始时间
paramForSelect.put("start", days.get(i));
// 设置结束时间
paramForSelect.put("end", days.get(i + 1));
// 获取当前物料的入库总额
Integer count = 0;
if (type == 1) {
count = depositoryRecordMapper.findApplicationInByDateAndMaterial(paramForSelect);
} else {
paramForSelect.put("state", 1);
count = depositoryRecordMapper.findApplicationOutByDateAndMaterial(paramForSelect);
}
// 定义处理后的总额
double countProcessed = ObjectFormatUtil.divide(count, 100.0, 2);
// 声明总额且默认为0
double amount = 0.0;
if (inventoryById.getPrice() != null) { // 如果当前物料存在单价
// 获取当前物料的单价
double price = ObjectFormatUtil.divide(inventoryById.getPrice(), 100.0, 2);
// 获取当前物料的总额
amount = ObjectFormatUtil.multiply(price, countProcessed);
}
countList.add(countProcessed);
amountList.add(amount);
}
result.put("amountList", amountList);
result.put("countList", countList);
return result;
}
/** /**
* 用于完成出库时的相关处理操作 * 用于完成出库时的相关处理操作
* *

6
src/main/java/com/dreamchaser/depository_manage/utils/CollectionUtil.java

@ -1,6 +1,10 @@
package com.dreamchaser.depository_manage.utils; package com.dreamchaser.depository_manage.utils;
import org.apache.poi.ss.formula.functions.T;
import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.List;
public class CollectionUtil { public class CollectionUtil {
@ -11,4 +15,6 @@ public class CollectionUtil {
public static boolean isEmpty(Collection<?> coll) { public static boolean isEmpty(Collection<?> coll) {
return coll == null || coll.isEmpty(); return coll == null || coll.isEmpty();
} }
} }

1
src/main/java/com/dreamchaser/depository_manage/utils/CrudUtil.java

@ -6,7 +6,6 @@ import com.dreamchaser.depository_manage.pojo.StatusInfo;
/** /**
* 因为在控制层有很多重复可抽象出来的操作所以写一个工具类 * 因为在控制层有很多重复可抽象出来的操作所以写一个工具类
* @author 金昊霖
*/ */
public class CrudUtil { public class CrudUtil {
public static final RestResponse RESPONSE200=new RestResponse(); public static final RestResponse RESPONSE200=new RestResponse();

62
src/main/java/com/dreamchaser/depository_manage/utils/DateUtil.java

@ -1,5 +1,6 @@
package com.dreamchaser.depository_manage.utils; package com.dreamchaser.depository_manage.utils;
import com.alibaba.excel.util.ListUtils;
import org.joda.time.DateTime; import org.joda.time.DateTime;
import org.joda.time.LocalDate; import org.joda.time.LocalDate;
@ -12,12 +13,14 @@ import java.util.*;
* 用于处理时间类型的工具类 * 用于处理时间类型的工具类
*/ */
public class DateUtil { public class DateUtil {
private static final SimpleDateFormat TIME_FORMAT =new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
private static final SimpleDateFormat DATE_FORMAT =new SimpleDateFormat("yyyy-MM-dd");
public static final Long dayTime = ObjectFormatUtil.toLong(86400000); // 一天的时长 public static final Long dayTime = ObjectFormatUtil.toLong(86400000); // 一天的时长
public static final Long warningTime = ObjectFormatUtil.toLong(86400000 * 7); // 预定报警时间:7天 public static final Long warningTime = ObjectFormatUtil.toLong(86400000 * 7); // 预定报警时间:7天
private static final SimpleDateFormat TIME_FORMAT = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
private static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd");
/** /**
* 获取时间的字符串精确到s * 获取时间的字符串精确到s
*
* @param date 时间 * @param date 时间
* @return 转换格式的字符串 * @return 转换格式的字符串
*/ */
@ -27,6 +30,7 @@ public class DateUtil {
/** /**
* 获取时间的字符串精确到s * 获取时间的字符串精确到s
*
* @param date Date对象 * @param date Date对象
* @return 转换格式的字符串 * @return 转换格式的字符串
*/ */
@ -36,6 +40,7 @@ public class DateUtil {
/** /**
* 将Object对象转化为Instant对象 * 将Object对象转化为Instant对象
*
* @param o object对象实际是long类型 * @param o object对象实际是long类型
* @return Instant对象 * @return Instant对象
*/ */
@ -80,7 +85,6 @@ public class DateUtil {
} }
// 将日期转为时间戳 // 将日期转为时间戳
public static Long DateTimeByDayToTimeStamp(String dateTime) { public static Long DateTimeByDayToTimeStamp(String dateTime) {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
@ -94,9 +98,6 @@ public class DateUtil {
} }
// 将日期转为时间戳 // 将日期转为时间戳
public static Long DateTimeByMonthToTimeStamp(String dateTime) { public static Long DateTimeByMonthToTimeStamp(String dateTime) {
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM"); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM");
@ -133,6 +134,7 @@ public class DateUtil {
/** /**
* 获取今天的时间 * 获取今天的时间
*
* @return * @return
*/ */
public static Long getNowTimeForCalc() { public static Long getNowTimeForCalc() {
@ -151,6 +153,7 @@ public class DateUtil {
/** /**
* 获取昨天的时间 * 获取昨天的时间
*
* @return * @return
*/ */
public static Long getYesterdayTimeForCalc() { public static Long getYesterdayTimeForCalc() {
@ -209,6 +212,7 @@ public class DateUtil {
/** /**
* 用于判断当前日期是否在当月内 * 用于判断当前日期是否在当月内
*
* @param time 待查询日期 * @param time 待查询日期
* @return * @return
*/ */
@ -281,4 +285,50 @@ public class DateUtil {
} }
return lastTime; return lastTime;
} }
/**
* 获取本月至今的日期时间戳即日期名称
* @return
*/
public static Map<String, Object> getMonthBeginToNow() {
// 声明结果集
Map<String, Object> result = new HashMap<>();
// 声明格式化格式
SimpleDateFormat sdf = new SimpleDateFormat("MM-dd");
// 用于存储每天的日期名称
List<String> dayNameStrings = new ArrayList<>();
// 用于存储每天对应的时间戳
List<Long> dayTimeSpaceList = new ArrayList<>();
Calendar cal = Calendar.getInstance();
// 获取当天是这个月的第几天
int dayOfMonth = cal.get(Calendar.DAY_OF_MONTH) - 1;
cal.add(Calendar.MONTH, 0);
cal.set(Calendar.DAY_OF_MONTH, 1);
// 时
cal.set(Calendar.HOUR_OF_DAY, 0);
// 分
cal.set(Calendar.MINUTE, 0);
// 秒
cal.set(Calendar.SECOND, 0);
// 毫秒
cal.set(Calendar.MILLISECOND, 0);
while (dayOfMonth > 0) {
cal.set(Calendar.DAY_OF_MONTH, dayOfMonth);
dayOfMonth--;
dayTimeSpaceList.add(cal.getTimeInMillis());
dayNameStrings.add(sdf.format(cal.getTime()));
}
cal = Calendar.getInstance();
// 反转
Collections.reverse(dayTimeSpaceList);
// 反转
Collections.reverse(dayNameStrings);
dayTimeSpaceList.add(cal.getTimeInMillis());
dayNameStrings.add(sdf.format(cal.getTime()));
result.put("dayName",dayNameStrings);
result.put("dayTimeSpace",dayTimeSpaceList);
return result;
}
} }

44
src/main/java/com/dreamchaser/depository_manage/utils/ObjectFormatUtil.java

@ -1,6 +1,9 @@
package com.dreamchaser.depository_manage.utils; package com.dreamchaser.depository_manage.utils;
import org.apache.poi.ss.formula.functions.T;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.*;
/** /**
* 此工具类封装一些常用类型转换操作 * 此工具类封装一些常用类型转换操作
@ -62,6 +65,7 @@ public class ObjectFormatUtil {
BigDecimal bd2 = new BigDecimal(Double.toString(d2)); BigDecimal bd2 = new BigDecimal(Double.toString(d2));
return bd1.multiply(bd2).doubleValue(); return bd1.multiply(bd2).doubleValue();
} }
// double 类型相除,保留位数 // double 类型相除,保留位数
public static double divide(double a, double b, int scale) { public static double divide(double a, double b, int scale) {
BigDecimal bd1 = new BigDecimal(Double.toString(a)); BigDecimal bd1 = new BigDecimal(Double.toString(a));
@ -69,4 +73,44 @@ public class ObjectFormatUtil {
return bd1.divide(bd2, scale, BigDecimal.ROUND_HALF_UP).doubleValue(); return bd1.divide(bd2, scale, BigDecimal.ROUND_HALF_UP).doubleValue();
} }
/**
* 用于Object转为指定类型的列表
*
* @param obj 待转换obj
* @param cla 要转换为的类型
* @param <T> 泛型
* @return
*/
public static <T> List<T> objToList(Object obj, Class<T> cla) {
List<T> list = new ArrayList<T>();
if (obj instanceof ArrayList<?>) {
for (Object o : (List<?>) obj) {
list.add(cla.cast(o));
}
return list;
}
return null;
}
/**
* 用于Object转为指定类型的map
*
* @param obj 待转换obj
* @param keyType key要转换为的类型
* @param valueType value要转换为的类型
* @param <T> 泛型
* @return
*/
public static <T,S> Map<T, S> objToMap(Object obj, Class<T> keyType, Class<S> valueType) {
Map<T, S> map = new HashMap<T, S>();
if (obj instanceof Map<?, ?>) {
for (Object key : ((Map<?, ?>) obj).keySet()) {
Object value = ((Map<?, ?>) obj).get(key);
map.put(keyType.cast(key), valueType.cast(value));
}
return map;
}
return null;
}
} }

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

@ -95,7 +95,7 @@
lay-verify="required"/> lay-verify="required"/>
<input type="text" name="depositoryId" class="layui-input" id="depositoryId" th:value="${depository.getId()}" <input type="text" name="depositoryId" class="layui-input" id="depositoryId" th:value="${depository.getId()}"
style="display: none" lay-verify="required"/> style="display: none" lay-verify="required"/>
<input type="text" name="placeId" class="layui-input" id="placeId" value="0" <input type="text" name="placeId" class="layui-input" id="placeId" th:value="${placeId}"
style="display: none" lay-verify="required"/> style="display: none" lay-verify="required"/>
</div> </div>
</div> </div>

163
src/main/resources/templates/pages/depository/Inventory-view_back.html

@ -26,7 +26,7 @@
<body> <body>
<input type="text" id="id" th:value="${record.getId()}" name="id" style="display: none"> <input type="text" id="id" th:value="${record.getId()}" name="id" style="display: none">
<div class="layui-row layui-col-space1"> <div class="layui-row layui-col-space1">
<div class="layui-col-xs12 layui-col-md9"> <div class="layui-col-xs12 layui-col-md8">
<div class="grid-demo grid-demo-bg1"> <div class="grid-demo grid-demo-bg1">
<div class="panel panel-info"> <div class="panel panel-info">
<div class="panel-heading">物料基本信息 <div class="panel-heading">物料基本信息
@ -65,7 +65,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="layui-col-xs6 layui-col-md3"> <div class="layui-col-xs6 layui-col-md4">
<div class="grid-demo"> <div class="grid-demo">
<div class="panel panel-success"> <div class="panel panel-success">
<div class="panel-heading">库存基本信息</div> <div class="panel-heading">库存基本信息</div>
@ -81,6 +81,7 @@
<td>计量单位</td> <td>计量单位</td>
<td>对应数量</td> <td>对应数量</td>
<td th:style="'display:'+${display}">金额</td> <td th:style="'display:'+${display}">金额</td>
<td>操作</td>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -93,7 +94,8 @@
class="layui-btn layui-btn-primary layui-btn-sm"></button> class="layui-btn layui-btn-primary layui-btn-sm"></button>
</td> </td>
<td> <td>
<select class="mySelect" onchange="changeUnitForQuantity(this)" th:attr="id='materialUnit'+${materialAndPlace.getId()}" > <select class="mySelect" onchange="changeUnitForQuantity(this)"
th:attr="id='materialUnit'+${materialAndPlace.getId()}">
<option th:text="${record.getUnit()}" value="-1" <option th:text="${record.getUnit()}" value="-1"
class="myOption"></option> class="myOption"></option>
<option class="myOption" th:each="splitInfo,iterStar:${record.getSplitInfoList()}" <option class="myOption" th:each="splitInfo,iterStar:${record.getSplitInfoList()}"
@ -103,36 +105,61 @@
</td> </td>
<td> <td>
<span th:attr="id='quantity'+${materialAndPlace.getId()}" th:text="${materialAndPlace.getInventory()}"></span> <span th:attr="id='quantity'+${materialAndPlace.getId()}"
th:text="${materialAndPlace.getInventory()}"></span>
</td> </td>
<td th:style="'display:'+${display}"> <td th:style="'display:'+${display}">
<span th:attr="id='amounts'+${materialAndPlace.getId()}" th:text="${materialAndPlace.getAmount()}"></span> <span th:attr="id='amounts'+${materialAndPlace.getId()}"
th:text="${materialAndPlace.getAmount()}"></span>
</td>
<td>
<a class="layui-btn layui-btn-xs"
th:attr="mid=${materialAndPlace.getIid()},depositoryId=${materialAndPlace.getDepository_id()},placeId=${materialAndPlace.getPid()}"
lay-on="applicationIn">入库</a>
<a class="layui-btn layui-btn-xs"
th:attr="code=${materialAndPlace.getMcode()},depositoryId=${materialAndPlace.getDepository_id()}"
lay-on="applicationOut">出库</a>
</td> </td>
</tr> </tr>
</tbody> </tbody>
<tbody>
</tbody>
</table> </table>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="layui-col-xs6 layui-col-md12"> <div class="layui-col-xs6 layui-col-md12">
<div class="grid-demo grid-demo-bg2">xs:6/12 | md:12/12</div> <div class="panel panel-primary">
<div class="layui-col-xs4">
<div class="panel panel-warning">
<div class="panel-heading">物料入库明细</div>
<div class="panel-body">
<div id="echarts-line">
</div>
</div>
</div>
</div>
<div class="layui-col-xs4">
<div class="panel panel-warning">
<div class="panel-heading">物料出库明细</div>
<div class="panel-body">
</div>
</div>
</div>
<div class="layui-col-xs4">
<div class="panel panel-warning">
<div class="panel-heading">物料库存明细</div>
<div class="panel-body">
</div>
</div>
</div>
</div>
</div> </div>
</div> </div>
<script src="/static/lib/layui-v2.8.6/layui.js" charset="utf-8"></script> <script src="/static/lib/layui-v2.8.6/layui.js" charset="utf-8"></script>
<script src="/static/js/lay-config.js?v=1.0.4" charset="utf-8"></script> <script src="/static/js/lay-config.js?v=1.0.4" charset="utf-8"></script>
<script src="/static/lib/echarts/echarts.js" charset="utf-8"></script>
<script> <script>
function applicationIn() {
}
function applicationOut() {
}
function updateInventoryRemark() { function updateInventoryRemark() {
@ -146,17 +173,15 @@
} }
var barCode = []; var barCode = [];
var flag = false; var flag = false;
layui.use(['form', 'laydate', 'miniTab', 'util'], function () { layui.use(['form', 'laydate', 'util'], function () {
var form = layui.form, var form = layui.form,
laydate = layui.laydate, laydate = layui.laydate,
$ = layui.$, $ = layui.$,
util = layui.util, util = layui.util;
miniTab = layui.miniTab;
let iremark = $("#iremark").val(); let iremark = $("#iremark").val();
miniTab.listen(); let id = $("#id").val();
form.on('select()', function (data) { form.on('select()', function (data) {
var id = data.elem.id; //得到select原始DOM对象id var id = data.elem.id; //得到select原始DOM对象id
@ -193,43 +218,41 @@
} }
}); });
} },
}); 'applicationIn': function (obj) {
let mid = $(obj).attr('mid');
applicationOut = function () { let depositoryId = $(obj).attr('depositoryId');
var index = layer.open({ let placeId = $(obj).attr('placeId');
title: '出库申请', layer.open({
type: 2, type: 2,
shade: 0.2, offset: 'r',
maxmin: true, anim: 'slideLeft', // 从右往左
area: ['40%', '100%'],
shade: 0.1,
title: "入库申请",
shadeClose: true, shadeClose: true,
area: ['100%', '100%'], id: 'ID-demo-layer-direction-r',
content: '/application_out_back?code=' + $("#code").val() + "&depositoryId=" + $("#depositoryId").val() content: '/application_in_back?mid=' + mid + "&depositoryId=" + depositoryId + "&placeId=" + placeId
});
$(window).on("resize", function () {
layer.full(index);
}); });
return false; },
}; 'applicationOut': function (obj) {
let code = $(obj).attr('code');
applicationIn = function () { let depositoryId = $(obj).attr('depositoryId');
var index = layer.open({ layer.open({
title: '入库申请',
type: 2, type: 2,
shade: 0.2, offset: 'r',
maxmin: true, anim: 'slideLeft', // 从右往左
area: ['40%', '100%'],
shade: 0.1,
title: "出库申请",
shadeClose: true, shadeClose: true,
area: ['100%', '100%'], id: 'ID-demo-layer-direction-r',
content: '/application_in_back?mid=' + $("#id").val() + "&depositoryId=" + $("#depositoryId").val() content: '/application_out_back?code=' + code + "&depositoryId=" + depositoryId
}); });
$(window).on("resize", function () { },
layer.full(index);
}); });
return false;
};
updateInventoryRemark = function () { updateInventoryRemark = function () {
let id = $("#id").val();
let newIremark = $("#iremark").val(); let newIremark = $("#iremark").val();
let index = layer.confirm('确认更改备注?', { let index = layer.confirm('确认更改备注?', {
btn: ['确定', '取消'] //按钮 btn: ['确定', '取消'] //按钮
@ -322,7 +345,49 @@
} }
}); });
};
// 柱状图
var echartLineChart = echarts.init(document.getElementById('echarts-line'));
var optionLineChart = {
xAxis: {
type: 'category',
boundaryGap: false,
data: []
},
yAxis: {
type: 'value'
},
tooltip:{
trigger:"axis",
},
series: []
};
$.ajax({
url: '/depositoryRecord/getApplicationForMaterial',
type: 'post',
async: true,
dataType: "json",
data:JSON.stringify({"id":id}),
contentType: "application/json;charset=utf-8",
complete: function (XHR, TS) {
layer.close(this.layerIndex);
if (XHR.status !== 200) {
layer.alert("系统繁忙,稍后重试");
}
},
beforeSend: function () {
this.layerIndex = layer.load(0, {shade: [0.5, '#393D49']});
},
success: function (result) {
console.log(result);
} }
})
}); });

67
src/test/java/com/dreamchaser/depository_manage/LineChartForInventoryTest.java

@ -0,0 +1,67 @@
package com.dreamchaser.depository_manage;
import com.dreamchaser.depository_manage.entity.Inventory;
import com.dreamchaser.depository_manage.pojo.RestResponse;
import com.dreamchaser.depository_manage.service.DepositoryRecordService;
import com.dreamchaser.depository_manage.service.MaterialService;
import com.dreamchaser.depository_manage.utils.DateUtil;
import com.dreamchaser.depository_manage.utils.ObjectFormatUtil;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.*;
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@RunWith(SpringRunner.class)
public class LineChartForInventoryTest {
@Autowired
private MaterialService materialService;
@Autowired
private DepositoryRecordService depositoryRecordService;
/**
* 用于获取当前物料的本月出入库记录
*
* @param id 带查询库存id
*/
public RestResponse getInventoryApplication(Integer id) {
// 获取本月至今的日期
Map<String, Object> monthBeginToNow = DateUtil.getMonthBeginToNow();
// 获取至今的日期名称
List<String> dayNames = ObjectFormatUtil.objToList(monthBeginToNow.get("dayName"), String.class);
// 获取至今的日期时间戳
List<Long> dayTimeSpaces = ObjectFormatUtil.objToList(monthBeginToNow.get("dayTimeSpace"), Long.class);
// 获取当前物料的入库总额与数量
Map<String, List<Double>> resultForApplicationIn = depositoryRecordService.getApplicationByMaterial(id, dayTimeSpaces, 1);
List<Double> amountListForIn = resultForApplicationIn.get("amountList");
List<Double> countListForIn = resultForApplicationIn.get("countList");
// 获取当前物料的出库总额与数量
Map<String, List<Double>> resultForApplicationOut = depositoryRecordService.getApplicationByMaterial(id, dayTimeSpaces, 2);
List<Double> amountListForOut = resultForApplicationOut.get("amountList");
List<Double> countListForOut = resultForApplicationOut.get("countList");
Map<String, Object> result = new HashMap<>();
result.put("applicationInAmount", amountListForIn);
result.put("applicationInCount", countListForIn);
result.put("applicationOutAmount", amountListForOut);
result.put("applicationOutCount", countListForOut);
return new RestResponse(result);
}
@Test
public void Test() {
getInventoryApplication(136);
}
}

43
src/test/java/com/dreamchaser/depository_manage/SomeTest.java

@ -1,30 +1,19 @@
package com.dreamchaser.depository_manage; package com.dreamchaser.depository_manage;
import com.dreamchaser.depository_manage.config.PublicConfig; import com.alibaba.fastjson.JSONObject;
import com.dreamchaser.depository_manage.config.QyWxConfig; import com.dreamchaser.depository_manage.config.QyWxConfig;
import com.dreamchaser.depository_manage.config.QyWxJMJM.com.qq.weixin.mp.aes.AesException;
import com.dreamchaser.depository_manage.config.QyWxJMJM.com.qq.weixin.mp.aes.WXBizMsgCrypt;
import com.dreamchaser.depository_manage.entity.UserByPort;
import com.dreamchaser.depository_manage.pojo.ApplicationOutRecordP; import com.dreamchaser.depository_manage.pojo.ApplicationOutRecordP;
import com.dreamchaser.depository_manage.pojo.callBackXml.approvalCallBackXml.*; import com.dreamchaser.depository_manage.pojo.callBackXml.approvalCallBackXml.*;
import com.dreamchaser.depository_manage.security.pool.HandlesOtherFunctionalThreadPool;
import com.dreamchaser.depository_manage.security.pool.RedisPool; import com.dreamchaser.depository_manage.security.pool.RedisPool;
import com.dreamchaser.depository_manage.service.DepositoryRecordService; import com.dreamchaser.depository_manage.service.DepositoryRecordService;
import com.dreamchaser.depository_manage.utils.DateUtil; import com.dreamchaser.depository_manage.utils.*;
import com.dreamchaser.depository_manage.utils.Md5;
import com.dreamchaser.depository_manage.utils.ObjectFormatUtil;
import com.dreamchaser.depository_manage.utils.QyWxXMLUtils;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
import java.text.SimpleDateFormat; import java.util.*;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
import java.util.Map;
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@RunWith(SpringRunner.class) @RunWith(SpringRunner.class)
@ -325,25 +314,13 @@ public class SomeTest {
@Test @Test
public void otherTest(){ public void otherTest(){
//获取获取系统的当前日历对象 Map<String, Object> monthBeginToNow = DateUtil.getMonthBeginToNow();
Calendar instance = Calendar.getInstance(); Object dayName = monthBeginToNow.get("dayName");
int weekDay = instance.get(Calendar.DAY_OF_WEEK); Object dayTimeSpace = monthBeginToNow.get("dayTimeSpace");
weekDay = weekDay - 1; List<String> dayNames = ObjectFormatUtil.objToList(dayName,String.class);
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); List<Long> dayTimeSpaces = ObjectFormatUtil.objToList(dayTimeSpace,Long.class);
int now = instance.get(Calendar.DAY_OF_WEEK) - 1 == 0 ? 7 : instance.get(Calendar.DAY_OF_WEEK) - 1; System.out.println(dayNames);
List<Long> days = new ArrayList<>(); // 周一至今的每天 System.out.println(dayTimeSpaces);
instance.add(Calendar.DATE, 1);
days.add(DateUtil.DateTimeByDayToTimeStamp(formatter.format(instance.getTime())));
instance.add(Calendar.DATE, -1);
days.add(DateUtil.DateTimeByDayToTimeStamp(formatter.format(instance.getTime())));
while (now - 1 > 0) {
now--;
instance.add(Calendar.DATE, -1);
Long format = DateUtil.DateTimeByDayToTimeStamp(formatter.format(instance.getTime()));
days.add(format);
}
System.out.println(days);
System.out.println(DateUtil.getLastTimeInterval());
} }
} }

24
target/classes/com/dreamchaser/depository_manage/mapper/DepositoryRecordMapper.xml

@ -326,12 +326,14 @@
FROM applicationOutRecordInfo WHERE 1=1 FROM applicationOutRecordInfo WHERE 1=1
<if test='isDone == "0"'> <if test='isDone == "0"'>
and (departmentHeadTime = 0 and FIND_IN_SET(#{userId},departmenthead) != 0 and DepartmentheadPass = 3) and (departmentHeadTime = 0 and FIND_IN_SET(#{userId},departmenthead) != 0 and DepartmentheadPass = 3)
or (depositoryManagerTime = 0 and FIND_IN_SET(#{userId},depositoryManager) != 0 and depositoryManagerPass =3) or (depositoryManagerTime = 0 and FIND_IN_SET(#{userId},depositoryManager) != 0 and depositoryManagerPass
=3)
OR ( balancePosterTime = 0 AND FIND_IN_SET( #{userId}, balancePoster ) != 0 AND balancePosterPass = 3 ) OR ( balancePosterTime = 0 AND FIND_IN_SET( #{userId}, balancePoster ) != 0 AND balancePosterPass = 3 )
</if> </if>
<if test='isDone == "1"'> <if test='isDone == "1"'>
and (departmentHeadTime != 0 and FIND_IN_SET(#{userId},departmenthead) != 0 and DepartmentheadPass != 3) and (departmentHeadTime != 0 and FIND_IN_SET(#{userId},departmenthead) != 0 and DepartmentheadPass != 3)
or (depositoryManagerTime != 0 and FIND_IN_SET(#{userId},depositoryManager) != 0 and depositoryManagerPass != 3) or (depositoryManagerTime != 0 and FIND_IN_SET(#{userId},depositoryManager) != 0 and depositoryManagerPass
!= 3)
OR ( balancePosterTime != 0 AND FIND_IN_SET( #{userId}, balancePoster ) != 0 AND balancePosterPass != 3 ) OR ( balancePosterTime != 0 AND FIND_IN_SET( #{userId}, balancePoster ) != 0 AND balancePosterPass != 3 )
</if> </if>
group by aorid group by aorid
@ -1739,7 +1741,7 @@
</select> </select>
<!-- 获取某月某物料入库总额--> <!-- 获取某月某物料入库总额-->
<select id="findApplicationInByMonth" parameterType="map" resultType="int"> <select id="findApplicationInByDateAndMaterial" parameterType="map" resultType="int">
select ifnull(sum(quantity),0) select ifnull(sum(quantity),0)
from applicationinrecordinfo from applicationinrecordinfo
where 1 = 1 where 1 = 1
@ -1753,6 +1755,22 @@
<if test="typeId != null and typeId != ''"> <if test="typeId != null and typeId != ''">
and mtid = #{typeId} and mtid = #{typeId}
</if> </if>
<if test="mid != null and mid != ''">
and mid = #{mid}
</if>
</select>
<select id="findApplicationOutByDateAndMaterial" parameterType="map" resultType="int">
select ifnull(sum(aorquantity),0)
from applicationoutrecordinfo
where 1 = 1
and applicantTime between #{start} and #{end}
<if test="mid != null and mid != ''">
and mid = #{mid}
</if>
<if test="state == 1 or state == 4">
and depositoryManagerPass in (1,4)
</if>
</select> </select>
<select id="findApplicationInByMonthTest" parameterType="map" resultType="int"> <select id="findApplicationInByMonthTest" parameterType="map" resultType="int">

2
target/classes/static/js/stockTaking/stockTakingForLocationTable.js

@ -339,7 +339,7 @@ layui.use(['form', 'step', 'flow', 'table', 'inputTag'], function () {
let req = {}; let req = {};
req.depositoryId = depositoryId; req.depositoryId = depositoryId;
req.placeId = placeId; req.placeId = placeId;
table.reload('currentTableForLocation', { table.reloadData('currentTableForLocation', {
url: '/material/findInventoryForStockTaking', url: '/material/findInventoryForStockTaking',
page: { page: {
curr: 1 curr: 1

2
target/classes/static/js/stockTaking/stockTakingForMaterial.js

@ -126,7 +126,7 @@ layui.use(['form', 'step', 'flow', 'table', 'inputTag'], function () {
updateTableShowForMaterial = function () { updateTableShowForMaterial = function () {
let req = {}; let req = {};
req.mid = $("#mid").val(); req.mid = $("#mid").val();
table.reload('currentTableForMaterial', { table.reloadData('currentTableForMaterial', {
url: '/material/findMaterialByConditionForStockTaking', url: '/material/findMaterialByConditionForStockTaking',
page: { page: {
curr: 1 curr: 1

10
target/classes/templates/pages/BusinessType/businesstype_out.html

@ -141,7 +141,7 @@
req.state = data.state; req.state = data.state;
} }
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/businessType/findBusinessType', url: '/businessType/findBusinessType',
page: { page: {
curr: 1 curr: 1
@ -198,7 +198,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}); });
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/businessType/findBusinessType', url: '/businessType/findBusinessType',
page: { page: {
curr: 1 curr: 1
@ -231,7 +231,7 @@
content: '/businessTypeEdit?id=' + data.id, content: '/businessTypeEdit?id=' + data.id,
end: function () { end: function () {
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/businessType/findBusinessType', url: '/businessType/findBusinessType',
page: { page: {
curr: 1 curr: 1
@ -288,7 +288,7 @@
content: '/businessTypeEdit?id=' + obj.id, content: '/businessTypeEdit?id=' + obj.id,
end: function () { end: function () {
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/businessType/findBusinessType', url: '/businessType/findBusinessType',
page: { page: {
curr: 1 curr: 1
@ -326,7 +326,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}, function () { }, function () {
// 执行表格重加载 // 执行表格重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/businessType/findBusinessType', url: '/businessType/findBusinessType',
page: { page: {
curr: 1 curr: 1

2
target/classes/templates/pages/application/application-in_back.html

@ -95,7 +95,7 @@
lay-verify="required"/> lay-verify="required"/>
<input type="text" name="depositoryId" class="layui-input" id="depositoryId" th:value="${depository.getId()}" <input type="text" name="depositoryId" class="layui-input" id="depositoryId" th:value="${depository.getId()}"
style="display: none" lay-verify="required"/> style="display: none" lay-verify="required"/>
<input type="text" name="placeId" class="layui-input" id="placeId" value="0" <input type="text" name="placeId" class="layui-input" id="placeId" th:value="${placeId}"
style="display: none" lay-verify="required"/> style="display: none" lay-verify="required"/>
</div> </div>
</div> </div>

2
target/classes/templates/pages/application/application-out_min.html

@ -111,7 +111,7 @@
fixed: false, fixed: false,
content: '/scanQrCodeByOut?id=' + data.id, content: '/scanQrCodeByOut?id=' + data.id,
end: function () { end: function () {
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/depositoryRecord/ApplicationOutMinByDid', url: '/depositoryRecord/ApplicationOutMinByDid',
page: { page: {
curr: 1 curr: 1

4
target/classes/templates/pages/application/application_multi.html

@ -248,7 +248,7 @@
icon: 0, icon: 0,
time: 1000 time: 1000
}, function () { }, function () {
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/depositoryRecord/applicant_multi_create', url: '/depositoryRecord/applicant_multi_create',
page: { page: {
curr: 1 curr: 1
@ -263,7 +263,7 @@
}, //1秒关闭(如果不配置,默认是3秒) }, //1秒关闭(如果不配置,默认是3秒)
function () { function () {
//do something //do something
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/depositoryRecord/applicant_multi_create', url: '/depositoryRecord/applicant_multi_create',
page: { page: {
curr: 1 curr: 1

4
target/classes/templates/pages/authorization/depositoryOpen.html

@ -102,7 +102,7 @@
}); });
} else { } else {
table.reload('currentTableForUser', { table.reloadData('currentTableForUser', {
url: '/sys/findUsers', url: '/sys/findUsers',
page: { page: {
curr: 1 curr: 1
@ -195,7 +195,7 @@
req.number = data.number; req.number = data.number;
} }
//执行搜索重载 //执行搜索重载
table.reload('currentTableForUser', { table.reloadData('currentTableForUser', {
url: '/sys/findUsers', url: '/sys/findUsers',
page: { page: {
curr: 1 curr: 1

2
target/classes/templates/pages/company/company-out.html

@ -139,7 +139,7 @@
} }
req.superior = parentId; req.superior = parentId;
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/company/companyByCondition', url: '/company/companyByCondition',
page: { page: {
curr: 1 curr: 1

4
target/classes/templates/pages/company/company-out_back.html

@ -119,7 +119,7 @@
}); });
} }
else { else {
table.reload('currentTableForUser', { table.reloadData('currentTableForUser', {
url: '/sys/findUsers', url: '/sys/findUsers',
page: { page: {
curr: 1 curr: 1
@ -267,7 +267,7 @@
req.number = data.number; req.number = data.number;
} }
//执行搜索重载 //执行搜索重载
table.reload('currentTableForUser', { table.reloadData('currentTableForUser', {
url: '/sys/findUsers', url: '/sys/findUsers',
page: { page: {
curr: 1 curr: 1

2
target/classes/templates/pages/company/companyByParentId.html

@ -141,7 +141,7 @@
} }
req.parentId = parentId; req.parentId = parentId;
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/company/companyByCondition', url: '/company/companyByCondition',
page: { page: {
curr: 1 curr: 1

10
target/classes/templates/pages/constructionunit/constructionunit_out.html

@ -141,7 +141,7 @@
req.state = data.state; req.state = data.state;
} }
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/company/allConstructionUnit', url: '/company/allConstructionUnit',
page: { page: {
curr: 1 curr: 1
@ -198,7 +198,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}); });
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/company/allConstructionUnit', url: '/company/allConstructionUnit',
page: { page: {
curr: 1 curr: 1
@ -231,7 +231,7 @@
content: '/constructionUnitEdit?id=' + data.id, content: '/constructionUnitEdit?id=' + data.id,
end: function () { end: function () {
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/company/allConstructionUnit', url: '/company/allConstructionUnit',
page: { page: {
curr: 1 curr: 1
@ -288,7 +288,7 @@
content: '/constructionUnitEdit?id=' + obj.id, content: '/constructionUnitEdit?id=' + obj.id,
end: function () { end: function () {
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/company/allConstructionUnit', url: '/company/allConstructionUnit',
page: { page: {
curr: 1 curr: 1
@ -326,7 +326,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}, function () { }, function () {
// 执行表格重加载 // 执行表格重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/company/allConstructionUnit', url: '/company/allConstructionUnit',
page: { page: {
curr: 1 curr: 1

4
target/classes/templates/pages/depository/table-in.html

@ -220,7 +220,7 @@
} }
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/depositoryRecord/applicationInView', url: '/depositoryRecord/applicationInView',
page: { page: {
curr: 1 curr: 1
@ -277,7 +277,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}); });
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/depositoryRecord/applicationInView', url: '/depositoryRecord/applicationInView',
page: { page: {
curr: 1 curr: 1

5
target/classes/templates/pages/depository/table-out.html

@ -285,6 +285,7 @@
flagForReload = false; flagForReload = false;
let col = {field: 'price', title: '金额', minWidth: 150, sort: true}; let col = {field: 'price', title: '金额', minWidth: 150, sort: true};
cols.splice(6, 0, col); cols.splice(6, 0, col);
// table.reloadData('currentTableId', {cols: [cols]});
table.reload('currentTableId', {cols: [cols]}); table.reload('currentTableId', {cols: [cols]});
} }
@ -322,7 +323,7 @@
req.version = data.version.trim(); req.version = data.version.trim();
} }
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/depositoryRecord/applicationOutView', url: '/depositoryRecord/applicationOutView',
page: { page: {
curr: 1 curr: 1
@ -395,7 +396,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}); });
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/depositoryRecord/applicationOutView', url: '/depositoryRecord/applicationOutView',
page: { page: {
curr: 1 curr: 1

57
target/classes/templates/pages/depository/table-stock.html

@ -86,8 +86,10 @@
<table class="layui-hide" id="currentTableId" lay-filter="currentTableFilter"></table> <table class="layui-hide" id="currentTableId" lay-filter="currentTableFilter"></table>
<script id="currentTableBar" type="text/html"> <script id="currentTableBar" type="text/html">
<a class="layui-btn layui-btn-normal layui-btn-xs data-count-subclass" mid="{{d.id}}" depository="{{d.depositoryId}}" lay-on="applicationIn">入库申请</a> <a class="layui-btn layui-btn-normal layui-btn-xs data-count-subclass" mid="{{d.id}}"
<a class="layui-btn layui-btn-xs data-count-edit" code="{{d.code}}" depository="{{d.depositoryId}}" lay-on="applicationOut" >出库申请</a> depository="{{d.depositoryId}}" lay-on="applicationIn">入库申请</a>
<a class="layui-btn layui-btn-xs data-count-edit" code="{{d.code}}" depository="{{d.depositoryId}}"
lay-on="applicationOut">出库申请</a>
</script> </script>
<!-- 用于计量单位的展示--> <!-- 用于计量单位的展示-->
@ -98,7 +100,7 @@
</script> </script>
<script id="changePlace" type="text/html"> <script id="changePlace" type="text/html">
<span style="display: none">{{d.placeKingdeeCode}}</span> <span >{{d.placeKingdeeCode}}</span>
</script> </script>
@ -206,20 +208,19 @@
{type: "checkbox", width: 50}, {type: "checkbox", width: 50},
{field: "code", title: '存货编码', width: 150, templet: '#materialCode'}, {field: "code", title: '存货编码', width: 150, templet: '#materialCode'},
{field: 'mname', width: 200, title: '物料名称'}, {field: 'mname', width: 200, title: '物料名称'},
{field: 'brand', width: 200, title: '品牌'}, {field: 'brand', width: 200, title: '品牌',hide:true},
{field: 'version', width: 200, title: '规格型号'}, {field: 'version', width: 200, title: '规格型号'},
{field: 'typeName', width: 200, title: '物料类型'}, {field: 'typeName', width: 200, title: '物料类型',hide:true},
{field: "unit", title: '计量单位', width: 200, templet: '#changeUnit', align: "center"}, {field: "unit", title: '计量单位', width: 200, templet: '#changeUnit', align: "center"},
{field: 'quantity', width: 200, title: '数量'}, {field: 'quantity', width: 200, title: '数量'},
{field: 'depositoryName', width: 200, title: '仓库名称'}, {field: 'depositoryName', width: 200, title: '仓库名称'},
{field: 'depositoryCode', width: 200, title: '仓库编码'}, {field: 'depositoryCode', width: 200, title: '仓库编码'},
// {title: '所处库位', width: 200, templet: '#changePlace', align: "center"}, {title: '所处库位', width: 200, templet: '#changePlace', align: "center"},
{field: "placeKingdeeCode", title: '所处库位', width: 200, templet: '#changePlace', align: "center"},
{field: 'warningCount', width: 200, title: '待过期数量', sort: true}, {field: 'warningCount', width: 200, title: '待过期数量', sort: true},
{field: 'price', title: '单价', width: 200, sort: true}, {field: 'price', title: '单价', width: 200, sort: true},
{field: 'amounts', title: '总金额', width: 200, sort: true}, {field: 'amounts', title: '总金额', width: 200, sort: true},
{field: 'texture', width: 200, title: '材质',}, {field: 'texture', width: 200, title: '材质',hide:true},
{field: 'iremark', width: 200, title: '备注',}, {field: 'iremark', width: 200, title: '备注',hide:true},
{title: '操作', minWidth: 250, toolbar: '#currentTableBar', align: "center"} {title: '操作', minWidth: 250, toolbar: '#currentTableBar', align: "center"}
]; ];
@ -254,17 +255,16 @@
{type: "checkbox", width: 50}, {type: "checkbox", width: 50},
{title: '存货编码', width: 150, templet: '#materialCode'}, {title: '存货编码', width: 150, templet: '#materialCode'},
{field: 'mname', width: 200, title: '物料名称'}, {field: 'mname', width: 200, title: '物料名称'},
{field: 'brand', width: 200, title: '品牌'}, {field: 'brand', width: 200, title: '品牌', hide: true},
{field: 'version', width: 200, title: '规格型号'}, {field: 'version', width: 200, title: '规格型号'},
{field: 'typeName', width: 200, title: '物料类型'}, {field: 'typeName', width: 200, title: '物料类型', hide: true},
{field: "unit", title: '计量单位', width: 200, templet: '#changeUnit', align: "center"}, {field: "unit", title: '计量单位', width: 200, templet: '#changeUnit', align: "center"},
{field: 'quantity', width: 200, title: '数量'}, {field: 'quantity', width: 200, title: '数量'},
{field: 'depositoryName', width: 200, title: '仓库名称'}, {field: 'depositoryName', width: 200, title: '仓库名称'},
{field: 'depositoryCode', width: 200, title: '仓库编码'}, {field: 'depositoryCode', width: 200, title: '仓库编码', hide: true},
{title: '所处库位', width: 200, templet: '#changePlace', align: "center"}, {title: '所处库位', width: 200, templet: '#changePlace', align: "center"},
{field: "placeKingdeeCode", title: '所处库位', width: 200, templet: '#changePlace', align: "center"}, {field: 'warningCount', width: 200, title: '待过期数量', sort: true, hide: true},
{field: 'warningCount', width: 200, title: '待过期数量', sort: true}, {field: 'texture', width: 200, title: '材质', hide: true},
{field: 'texture', width: 200, title: '材质',},
{field: 'iremark', width: 200, title: '备注',}, {field: 'iremark', width: 200, title: '备注',},
{title: '操作', minWidth: 250, toolbar: '#currentTableBar', align: "center"} {title: '操作', minWidth: 250, toolbar: '#currentTableBar', align: "center"}
] ]
@ -283,10 +283,6 @@
} }
$.each(res['data'], function (i, j) { $.each(res['data'], function (i, j) {
let jElement = j['warningCount']; let jElement = j['warningCount'];
let placeCode = j['placeCode'].split(" ");
let placeKingdeeCode = j['placeKingdeeCode'].split(" ");
let depositoryId = j['depositoryId'];
let mid = j['id'];
if (jElement !== null && jElement !== undefined) { if (jElement !== null && jElement !== undefined) {
let flag = (Number(jElement) !== 0); let flag = (Number(jElement) !== 0);
if (flag) { if (flag) {
@ -294,17 +290,6 @@
} }
} }
// 所处库位
var placeCodeItem = $("[lay-id='currentTableId'] tr:eq(" + (i + 1) + ")").children()[10];
//计量单位
// 用于库位的添加
var aItem = placeCodeItem.childNodes[0];
// 用于计量单位的添加
for (let k = 0; k < placeKingdeeCode.length; k++) {
if (placeKingdeeCode[k] !== "") {
$(aItem).append('<button code=' + placeCode[k] + ' id=' + mid + ' class="layui-btn layui-btn-primary layui-btn-xs" onclick="changePlaceCode(this)" value=' + depositoryId + '>' + placeKingdeeCode[k] + '</button>')
}
}
}); });
} }
@ -364,7 +349,7 @@
} }
reqForPublic = req; reqForPublic = req;
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/material/findInventory', url: '/material/findInventory',
page: { page: {
curr: 1 curr: 1
@ -404,7 +389,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}, function () { }, function () {
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/material/findInventory', url: '/material/findInventory',
page: { page: {
curr: 1 curr: 1
@ -418,7 +403,7 @@
time: 200, time: 200,
}, function () { }, function () {
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/material/findInventory', url: '/material/findInventory',
page: { page: {
curr: 1 curr: 1
@ -553,7 +538,7 @@
}, },
end: function () { end: function () {
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/material/findInventory', url: '/material/findInventory',
page: { page: {
curr: 1 curr: 1
@ -690,7 +675,7 @@
layer.close(indexForMsg); layer.close(indexForMsg);
layer.close(loading2); layer.close(loading2);
closeShowDataMessage(); closeShowDataMessage();
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/material/findInventory', url: '/material/findInventory',
page: { page: {
curr: 1 curr: 1
@ -766,7 +751,7 @@
content: '/InventoryView?id=' + obj.id, content: '/InventoryView?id=' + obj.id,
end: function () { end: function () {
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/material/findInventory', url: '/material/findInventory',
page: { page: {
curr: 1 curr: 1

6
target/classes/templates/pages/group/application_multi.html

@ -155,7 +155,7 @@
}, //1秒关闭(如果不配置,默认是3秒) }, //1秒关闭(如果不配置,默认是3秒)
function () { function () {
//do something //do something
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/group/applicant_multi_create', url: '/group/applicant_multi_create',
page: { page: {
curr: 1 curr: 1
@ -200,7 +200,7 @@
}, //1秒关闭(如果不配置,默认是3秒) }, //1秒关闭(如果不配置,默认是3秒)
function () { function () {
//do something //do something
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/group/applicant_multi_create', url: '/group/applicant_multi_create',
page: { page: {
curr: 1 curr: 1
@ -243,7 +243,7 @@
}, //1秒关闭(如果不配置,默认是3秒) }, //1秒关闭(如果不配置,默认是3秒)
function () { function () {
//do something //do something
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/group/applicant_multi_create', url: '/group/applicant_multi_create',
page: { page: {
curr: 1 curr: 1

6
target/classes/templates/pages/group/group-add.html

@ -196,7 +196,7 @@
}, //1秒关闭(如果不配置,默认是3秒) }, //1秒关闭(如果不配置,默认是3秒)
function () { function () {
//do something //do something
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/material/material', url: '/material/material',
page: { page: {
curr: 1 curr: 1
@ -226,7 +226,7 @@
}, //1秒关闭(如果不配置,默认是3秒) }, //1秒关闭(如果不配置,默认是3秒)
function () { function () {
//do something //do something
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/material/material', url: '/material/material',
page: { page: {
curr: 1 curr: 1
@ -265,7 +265,7 @@
} }
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/material/material', url: '/material/material',
page: { page: {
curr: 1 curr: 1

22
target/classes/templates/pages/group/group-out.html

@ -196,7 +196,7 @@
} }
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/group/findAllGroup', url: '/group/findAllGroup',
page: { page: {
curr: 1 curr: 1
@ -229,7 +229,7 @@
} else { } else {
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/group/findAllGroup', url: '/group/findAllGroup',
page: { page: {
curr: 1 curr: 1
@ -259,7 +259,7 @@
area: ['100%', '100%'], area: ['100%', '100%'],
content: '/group_edit?id='+data.id, content: '/group_edit?id='+data.id,
end:function () { end:function () {
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/group/findAllGroup', url: '/group/findAllGroup',
page: { page: {
curr: 1 curr: 1
@ -292,7 +292,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}); });
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/group/findAllGroup', url: '/group/findAllGroup',
page: { page: {
curr: 1 curr: 1
@ -325,7 +325,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}); });
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/group/findAllGroup', url: '/group/findAllGroup',
page: { page: {
curr: 1 curr: 1
@ -387,7 +387,7 @@
fixed: false, fixed: false,
content: '/materialForGroup?mid='+mid+'&gid='+gid, content: '/materialForGroup?mid='+mid+'&gid='+gid,
end:function () { end:function () {
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/group/findAllGroup', url: '/group/findAllGroup',
page: { page: {
curr: 1 curr: 1
@ -421,7 +421,7 @@
if (data.status >= 300) { if (data.status >= 300) {
layer.msg(data.statusInfo.message);//失败的表情 layer.msg(data.statusInfo.message);//失败的表情
} else { } else {
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/group/findAllGroup', url: '/group/findAllGroup',
page: { page: {
curr: 1 curr: 1
@ -451,7 +451,7 @@
fixed: false, fixed: false,
content: '/group_add', content: '/group_add',
end:function () { end:function () {
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/group/findAllGroup', url: '/group/findAllGroup',
page: { page: {
curr: 1 curr: 1
@ -488,7 +488,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}); });
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/group/findAllGroup', url: '/group/findAllGroup',
page: { page: {
curr: 1 curr: 1
@ -527,7 +527,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}, function () { }, function () {
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/group/findAllGroup', url: '/group/findAllGroup',
page: { page: {
curr: 1 curr: 1
@ -540,7 +540,7 @@
time: 200, time: 200,
}, function () { }, function () {
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/group/findAllGroup', url: '/group/findAllGroup',
page: { page: {
curr: 1 curr: 1

8
target/classes/templates/pages/group/group_edit.html

@ -179,7 +179,7 @@
fixed: false, fixed: false,
content: '/materialForGroup?mid=' + data.mid + '&gid=' + id, content: '/materialForGroup?mid=' + data.mid + '&gid=' + id,
end: function () { end: function () {
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/group/findGroupInfo', url: '/group/findGroupInfo',
page: { page: {
curr: 1 curr: 1
@ -211,7 +211,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}); });
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/group/findGroupInfo', url: '/group/findGroupInfo',
page: { page: {
curr: 1 curr: 1
@ -244,7 +244,7 @@
fixed: false, fixed: false,
content: '/group_add?gid=' + id, content: '/group_add?gid=' + id,
end: function () { end: function () {
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/group/findGroupInfo', url: '/group/findGroupInfo',
page: { page: {
curr: 1 curr: 1
@ -282,7 +282,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}); });
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/group/findGroupInfo', url: '/group/findGroupInfo',
page: { page: {
curr: 1 curr: 1

16
target/classes/templates/pages/material/material-out.html

@ -249,7 +249,7 @@
flagForRelod = false; flagForRelod = false;
let col = {field: 'price', width: 150, title: '物料单价'}; let col = {field: 'price', width: 150, title: '物料单价'};
cols.splice(6, 0, col); cols.splice(6, 0, col);
table.reload('currentTableId', {cols: [cols]}); table.reloadData('currentTableId', {cols: [cols]});
} }
} }
@ -386,7 +386,7 @@
layer.close(indexForMsg); layer.close(indexForMsg);
layer.close(loading2); layer.close(loading2);
closeShowDataMessage(); closeShowDataMessage();
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/material/material', url: '/material/material',
page: { page: {
curr: 1 curr: 1
@ -444,7 +444,7 @@
layer.close(indexForMsg); layer.close(indexForMsg);
layer.close(loading2); layer.close(loading2);
closeShowDataMessage(); closeShowDataMessage();
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/material/material', url: '/material/material',
page: { page: {
curr: 1 curr: 1
@ -508,7 +508,7 @@
} }
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/material/material', url: '/material/material',
page: { page: {
curr: 1 curr: 1
@ -565,7 +565,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}); });
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/material/material', url: '/material/material',
page: { page: {
curr: 1 curr: 1
@ -647,7 +647,7 @@
content: '/material_view?id=' + data.id, content: '/material_view?id=' + data.id,
end: function () { end: function () {
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/material/material', url: '/material/material',
page: { page: {
curr: 1 curr: 1
@ -718,7 +718,7 @@
}) })
}, function () { }, function () {
// 执行重加载 // 执行重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/repository/warehouseRecord', url: '/repository/warehouseRecord',
page: { page: {
curr: 1 curr: 1
@ -778,7 +778,7 @@
content: '/material_view?id=' + obj.id, content: '/material_view?id=' + obj.id,
end: function () { end: function () {
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/material/material', url: '/material/material',
page: { page: {
curr: 1 curr: 1

2
target/classes/templates/pages/material/material-out_mobile.html

@ -260,7 +260,7 @@
content: '/material_view?id=' + obj, content: '/material_view?id=' + obj,
end: function () { end: function () {
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/material/material', url: '/material/material',
page: { page: {
curr: 1 curr: 1

6
target/classes/templates/pages/materialBarCode/materialBarCode_out.html

@ -123,7 +123,7 @@
dataType: "json", dataType: "json",
contentType: "application/json;charset=utf-8", contentType: "application/json;charset=utf-8",
success: function (d) { success: function (d) {
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/material/findMaterialBarCode', url: '/material/findMaterialBarCode',
page: { page: {
curr: 1 curr: 1
@ -187,7 +187,7 @@
strings = strings.filter(item => item && item.trim()); strings = strings.filter(item => item && item.trim());
barCode = strings; barCode = strings;
notice(strings); notice(strings);
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/material/findMaterialBarCode', url: '/material/findMaterialBarCode',
page: { page: {
curr: 1 curr: 1
@ -229,7 +229,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}); });
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/material/findMaterialBarCode', url: '/material/findMaterialBarCode',
page: { page: {
curr: 1 curr: 1

12
target/classes/templates/pages/materialtype/materialTypeByParentId.html

@ -138,7 +138,7 @@
} }
req.parentId = parentId; req.parentId = parentId;
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/materialType/materialTypeRecord', url: '/materialType/materialTypeRecord',
page: { page: {
curr: 1 curr: 1
@ -195,7 +195,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}); });
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/materialType/materialTypeRecord', url: '/materialType/materialTypeRecord',
page: { page: {
curr: 1 curr: 1
@ -306,7 +306,7 @@
icon: 6,//成功的表情 icon: 6,//成功的表情
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}, function () { }, function () {
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/materialType/materialTypeRecord', url: '/materialType/materialTypeRecord',
page: { page: {
curr: 1 curr: 1
@ -318,7 +318,7 @@
} }
}) })
}, function () { }, function () {
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/materialType/materialTypeRecord', url: '/materialType/materialTypeRecord',
page: { page: {
curr: 1 curr: 1
@ -347,7 +347,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}, function () { }, function () {
// 执行表格重加载 // 执行表格重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/materialType/materialTypeRecord', url: '/materialType/materialTypeRecord',
page: { page: {
curr: 1 curr: 1
@ -383,7 +383,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}, function () { }, function () {
// 执行表格重加载 // 执行表格重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/materialType/materialTypeRecord', url: '/materialType/materialTypeRecord',
page: { page: {
curr: 1 curr: 1

22
target/classes/templates/pages/materialtype/materialType_view.html

@ -182,7 +182,7 @@
} }
req.parentId = parentId; req.parentId = parentId;
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/materialType/materialTypeRecord', url: '/materialType/materialTypeRecord',
page: { page: {
curr: 1 curr: 1
@ -240,7 +240,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}); });
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/materialType/materialTypeRecord', url: '/materialType/materialTypeRecord',
page: { page: {
curr: 1 curr: 1
@ -375,7 +375,7 @@
layer.close(indexForMsg); layer.close(indexForMsg);
layer.close(loading2); layer.close(loading2);
closeShowDataMessage(); closeShowDataMessage();
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/materialType/materialTypeRecord', url: '/materialType/materialTypeRecord',
page: { page: {
curr: 1 curr: 1
@ -456,7 +456,7 @@
content: '/materialType_detail?id=' + data.oldId, content: '/materialType_detail?id=' + data.oldId,
end: function () { end: function () {
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/materialType/materialTypeRecord', url: '/materialType/materialTypeRecord',
page: { page: {
curr: 1 curr: 1
@ -486,7 +486,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}, function () { }, function () {
// 执行重加载 // 执行重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/materialType/materialTypeRecord', url: '/materialType/materialTypeRecord',
page: { page: {
curr: 1 curr: 1
@ -553,7 +553,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}, function () { }, function () {
// 执行重加载 // 执行重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/materialType/materialTypeRecord', url: '/materialType/materialTypeRecord',
page: { page: {
curr: 1 curr: 1
@ -590,7 +590,7 @@
}) })
}, function () { }, function () {
// 执行重加载 // 执行重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/materialType/materialTypeRecord', url: '/materialType/materialTypeRecord',
page: { page: {
curr: 1 curr: 1
@ -647,7 +647,7 @@
icon: 6,//成功的表情 icon: 6,//成功的表情
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}, function () { }, function () {
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/materialType/materialTypeRecord', url: '/materialType/materialTypeRecord',
page: { page: {
curr: 1 curr: 1
@ -659,7 +659,7 @@
} }
}) })
}, function () { }, function () {
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/materialType/materialTypeRecord', url: '/materialType/materialTypeRecord',
page: { page: {
curr: 1 curr: 1
@ -688,7 +688,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}, function () { }, function () {
// 执行表格重加载 // 执行表格重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/materialType/materialTypeRecord', url: '/materialType/materialTypeRecord',
page: { page: {
curr: 1 curr: 1
@ -725,7 +725,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}, function () { }, function () {
// 执行表格重加载 // 执行表格重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/materialType/materialTypeRecord', url: '/materialType/materialTypeRecord',
page: { page: {
curr: 1 curr: 1

12
target/classes/templates/pages/notice/notice-out.html

@ -164,7 +164,7 @@
req.endDate = data.endDate; req.endDate = data.endDate;
} }
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/notice/findAllNotices', url: '/notice/findAllNotices',
page: { page: {
curr: 1 curr: 1
@ -221,7 +221,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}); });
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/notice/findAllNotices', url: '/notice/findAllNotices',
page: { page: {
curr: 1 curr: 1
@ -259,7 +259,7 @@
content: '/noticeView?id=' + data.id, content: '/noticeView?id=' + data.id,
end: function () { end: function () {
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/notice/findAllNotices', url: '/notice/findAllNotices',
page: { page: {
curr: 1 curr: 1
@ -338,7 +338,7 @@
}, function () { }, function () {
// 执行重加载 // 执行重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/notice/findAllNotices', url: '/notice/findAllNotices',
page: { page: {
curr: 1 curr: 1
@ -377,7 +377,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}, function () { }, function () {
// 执行表格重加载 // 执行表格重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/notice/findAllNotices', url: '/notice/findAllNotices',
page: { page: {
curr: 1 curr: 1
@ -411,7 +411,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}, function () { }, function () {
// 执行表格重加载 // 执行表格重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/notice/findAllNotices', url: '/notice/findAllNotices',
page: { page: {
curr: 1 curr: 1

8
target/classes/templates/pages/notice/notice-out_user.html

@ -160,7 +160,7 @@
req.endDate = data.endDate; req.endDate = data.endDate;
} }
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/notice/findAllNotices', url: '/notice/findAllNotices',
page: { page: {
curr: 1 curr: 1
@ -191,7 +191,7 @@
content: '/noticeView?id=' + data.id, content: '/noticeView?id=' + data.id,
end: function () { end: function () {
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/notice/findAllNotices', url: '/notice/findAllNotices',
page: { page: {
curr: 1 curr: 1
@ -265,7 +265,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}, function () { }, function () {
// 执行表格重加载 // 执行表格重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/notice/findAllNotices', url: '/notice/findAllNotices',
page: { page: {
curr: 1 curr: 1
@ -299,7 +299,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}, function () { }, function () {
// 执行表格重加载 // 执行表格重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/notice/findAllNotices', url: '/notice/findAllNotices',
page: { page: {
curr: 1 curr: 1

2
target/classes/templates/pages/post/post-out.html

@ -148,7 +148,7 @@
req.organization = organization; req.organization = organization;
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/company/allPostByOrganization', url: '/company/allPostByOrganization',
page: { page: {
curr: 1 curr: 1

2
target/classes/templates/pages/post/postRole.html

@ -187,7 +187,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}); });
//执行搜索重载 //执行搜索重载
table.reload('demo', { table.reloadData('demo', {
url: '/company/findPostRole?postId=' + postId+'&classes='+classes, url: '/company/findPostRole?postId=' + postId+'&classes='+classes,
page: { page: {
curr: 1 curr: 1

16
target/classes/templates/pages/split/split-out.html

@ -177,7 +177,7 @@
} }
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/split/split_out', url: '/split/split_out',
page: { page: {
curr: 1 curr: 1
@ -232,7 +232,7 @@
icon:5, icon:5,
time:1000 time:1000
},function () { },function () {
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/split/split_out', url: '/split/split_out',
page: { page: {
curr: 1 curr: 1
@ -251,7 +251,7 @@
icon:0, icon:0,
time:1000 time:1000
},function () { },function () {
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/split/split_out', url: '/split/split_out',
page: { page: {
curr: 1 curr: 1
@ -266,7 +266,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}); });
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/split/split_out', url: '/split/split_out',
page: { page: {
curr: 1 curr: 1
@ -305,7 +305,7 @@
content: '/split_edit?id=' + data.id, content: '/split_edit?id=' + data.id,
end: function () { end: function () {
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/split/split_out', url: '/split/split_out',
page: { page: {
curr: 1 curr: 1
@ -385,7 +385,7 @@
}) })
}, function () { }, function () {
// 执行重加载 // 执行重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/split/split_out', url: '/split/split_out',
page: { page: {
curr: 1 curr: 1
@ -492,7 +492,7 @@
}) })
}, function () { }, function () {
// 执行重加载 // 执行重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/split/split_out', url: '/split/split_out',
page: { page: {
curr: 1 curr: 1
@ -524,7 +524,7 @@
content: '/split_edit?id=' + obj.id, content: '/split_edit?id=' + obj.id,
end: function () { end: function () {
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/split/split_out', url: '/split/split_out',
page: { page: {
curr: 1 curr: 1

2
target/classes/templates/pages/stockTaking/stockTakingForTable.html

@ -282,7 +282,7 @@
let req = {}; let req = {};
req.depositoryId = depositoryId; req.depositoryId = depositoryId;
req.placeId = placeId; req.placeId = placeId;
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/material/findInventoryForStockTaking', url: '/material/findInventoryForStockTaking',
page: { page: {
curr: 1 curr: 1

2
target/classes/templates/pages/user/table-user.html

@ -188,7 +188,7 @@
req.number = data.number; req.number = data.number;
} }
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/sys/findUsers', url: '/sys/findUsers',
page: { page: {
curr: 1 curr: 1

2
target/classes/templates/pages/user/userRole.html

@ -186,7 +186,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}); });
//执行搜索重载 //执行搜索重载
table.reload('demo', { table.reloadData('demo', {
url: '/findUserRole?userId=' + userId+'&classes=1', url: '/findUserRole?userId=' + userId+'&classes=1',
page: { page: {
curr: 1 curr: 1

2
target/classes/templates/pages/user/userRoleForIn.html

@ -182,7 +182,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}); });
//执行搜索重载 //执行搜索重载
table.reload('demo', { table.reloadData('demo', {
url: '/findUserInRole?userId=' + userId+'&classes=1', url: '/findUserInRole?userId=' + userId+'&classes=1',
page: { page: {
curr: 1 curr: 1

26
target/classes/templates/pages/warehouse/depository-out.html

@ -173,7 +173,7 @@
req.parentId = parentId; req.parentId = parentId;
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/repository/warehouseRecord', url: '/repository/warehouseRecord',
page: { page: {
curr: 1 curr: 1
@ -222,7 +222,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}, function () { }, function () {
// 执行重加载 // 执行重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/repository/warehouseRecord', url: '/repository/warehouseRecord',
page: { page: {
curr: 1 curr: 1
@ -252,7 +252,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}); });
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/repository/warehouseRecord', url: '/repository/warehouseRecord',
page: { page: {
curr: 1 curr: 1
@ -312,7 +312,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}, function () { }, function () {
// 执行重加载 // 执行重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/repository/warehouseRecord', url: '/repository/warehouseRecord',
page: { page: {
curr: 1 curr: 1
@ -362,7 +362,7 @@
req = {}; req = {};
req.parentId = parentId; req.parentId = parentId;
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/repository/warehouseRecord', url: '/repository/warehouseRecord',
page: { page: {
curr: 1 curr: 1
@ -393,7 +393,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}, function () { }, function () {
// 执行重加载 // 执行重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/repository/warehouseRecord', url: '/repository/warehouseRecord',
page: { page: {
curr: 1 curr: 1
@ -430,7 +430,7 @@
}) })
}, function () { }, function () {
// 执行重加载 // 执行重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/repository/warehouseRecord', url: '/repository/warehouseRecord',
page: { page: {
curr: 1 curr: 1
@ -503,7 +503,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}, function () { }, function () {
// 执行重加载 // 执行重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/repository/warehouseRecord', url: '/repository/warehouseRecord',
page: { page: {
curr: 1 curr: 1
@ -517,7 +517,7 @@
}, },
function () { function () {
// 执行重加载 // 执行重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/repository/warehouseRecord', url: '/repository/warehouseRecord',
page: { page: {
curr: 1 curr: 1
@ -551,7 +551,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}, function () { }, function () {
// 执行重加载 // 执行重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/repository/warehouseRecord', url: '/repository/warehouseRecord',
page: { page: {
curr: 1 curr: 1
@ -565,7 +565,7 @@
}, },
function () { function () {
// 执行重加载 // 执行重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/repository/warehouseRecord', url: '/repository/warehouseRecord',
page: { page: {
curr: 1 curr: 1
@ -600,7 +600,7 @@
}, function () { }, function () {
// window.location='/findWareHouseByParentId?parentId=0'+parentId // window.location='/findWareHouseByParentId?parentId=0'+parentId
// 执行重加载 // 执行重加载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/repository/warehouseRecord', url: '/repository/warehouseRecord',
page: { page: {
curr: 1 curr: 1
@ -631,7 +631,7 @@
let req = {}; let req = {};
req.parentId = parentId; req.parentId = parentId;
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/repository/warehouseRecord', url: '/repository/warehouseRecord',
page: { page: {
curr: 1 curr: 1

8
target/classes/templates/pages/warehouse/warehouseByParentId.html

@ -181,7 +181,7 @@
} }
req.did = parentId; req.did = parentId;
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/place/findPlace', url: '/place/findPlace',
page: { page: {
curr: 1 curr: 1
@ -237,7 +237,7 @@
time: 500 //1秒关闭(如果不配置,默认是3秒) time: 500 //1秒关闭(如果不配置,默认是3秒)
}); });
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/place/findPlace', url: '/place/findPlace',
page: { page: {
curr: 1 curr: 1
@ -288,7 +288,7 @@
req = {}; req = {};
req.did = parentId; req.did = parentId;
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/place/findPlace', url: '/place/findPlace',
page: { page: {
curr: 1 curr: 1
@ -402,7 +402,7 @@
let req = {}; let req = {};
req.did = parentId; req.did = parentId;
//执行搜索重载 //执行搜索重载
table.reload('currentTableId', { table.reloadData('currentTableId', {
url: '/place/findPlace', url: '/place/findPlace',
page: { page: {
curr: 1 curr: 1

Loading…
Cancel
Save