Browse Source

添加保质期与生产日期功能

lwx_dev
erdanergou 3 years ago
parent
commit
2f8734b96c
  1. 2
      src/main/java/com/dreamchaser/depository_manage/controller/DepositoryController.java
  2. 24
      src/main/java/com/dreamchaser/depository_manage/controller/DepositoryRecordController.java
  3. 46
      src/main/java/com/dreamchaser/depository_manage/controller/MaterialController.java
  4. 1
      src/main/java/com/dreamchaser/depository_manage/controller/PageController.java
  5. 2
      src/main/java/com/dreamchaser/depository_manage/controller/StockTakingController.java
  6. 2
      src/main/java/com/dreamchaser/depository_manage/entity/ApplicationInRecord.java
  7. 29
      src/main/java/com/dreamchaser/depository_manage/entity/Govthreeing.java
  8. 47
      src/main/java/com/dreamchaser/depository_manage/entity/MaterialAndProducedDate.java
  9. 3
      src/main/java/com/dreamchaser/depository_manage/mapper/DepositoryRecordMapper.xml
  10. 37
      src/main/java/com/dreamchaser/depository_manage/mapper/MaterialMapper.java
  11. 112
      src/main/java/com/dreamchaser/depository_manage/mapper/MaterialMapper.xml
  12. 15
      src/main/java/com/dreamchaser/depository_manage/mapper/StockTakingMapper.xml
  13. 5
      src/main/java/com/dreamchaser/depository_manage/pojo/AdministrationP.java
  14. 17
      src/main/java/com/dreamchaser/depository_manage/pojo/MaterialP.java
  15. 5
      src/main/java/com/dreamchaser/depository_manage/pojo/SimpleApplicationOutMinRecordP.java
  16. 5
      src/main/java/com/dreamchaser/depository_manage/pojo/StockTakingChildP.java
  17. 19
      src/main/java/com/dreamchaser/depository_manage/service/MaterialService.java
  18. 189
      src/main/java/com/dreamchaser/depository_manage/service/impl/CompanyServiceImpl.java
  19. 104
      src/main/java/com/dreamchaser/depository_manage/service/impl/DepositoryRecordServiceImpl.java
  20. 107
      src/main/java/com/dreamchaser/depository_manage/service/impl/MaterialServiceImpl.java
  21. 264
      src/main/java/com/dreamchaser/depository_manage/service/impl/StockTakingServiceImpl.java
  22. 2
      src/main/java/com/dreamchaser/depository_manage/utils/DateUtil.java
  23. 6
      src/main/resources/application-test.yml
  24. 64
      src/main/resources/templates/pages/application/application-in.html
  25. 18
      src/main/resources/templates/pages/application/application-in_back.html
  26. 5
      src/main/resources/templates/pages/application/application-in_scanQrCode.html
  27. 31
      src/main/resources/templates/pages/application/application-out.html
  28. 4
      src/main/resources/templates/pages/application/application-out_back.html
  29. 2
      src/main/resources/templates/pages/application/application-out_min-mobile.html
  30. 1
      src/main/resources/templates/pages/application/application-out_min.html
  31. 4
      src/main/resources/templates/pages/application/application-out_scanQrCode.html
  32. 3
      src/main/resources/templates/pages/application/application-transfer.html
  33. 4
      src/main/resources/templates/pages/application/application-transfer_back.html
  34. 2
      src/main/resources/templates/pages/application/application_multi.html
  35. 159
      src/main/resources/templates/pages/depository/table-stock.html
  36. 45
      src/main/resources/templates/pages/material/material-add.html
  37. 15
      src/main/resources/templates/pages/material/material-out.html
  38. 32
      src/main/resources/templates/pages/material/material-view.html
  39. 5
      src/main/resources/templates/pages/material/selectDepository.html
  40. 4
      src/main/resources/templates/pages/material/selectDepositoryByCard.html
  41. 17
      src/main/resources/templates/pages/scanQrCode/ScanBarOrQrCodeOut.html
  42. 319
      src/main/resources/templates/pages/stockTaking/stockTaking.html
  43. 191
      src/test/java/com/dreamchaser/depository_manage/TestForManagerTree.java
  44. 4
      src/test/java/com/dreamchaser/depository_manage/TestForMaterialTree.java
  45. 2
      src/test/java/com/dreamchaser/depository_manage/TestForThisWeekInventory.java
  46. 2
      src/test/java/com/dreamchaser/depository_manage/TestForgetShowData.java
  47. 0
      target/classes/.restartTriggerFile
  48. 4
      target/classes/META-INF/MANIFEST.MF
  49. 17
      target/classes/META-INF/spring-configuration-metadata.json
  50. 87
      target/classes/application-test.yml
  51. 5
      target/classes/application.yml
  52. 14
      target/classes/banner.txt
  53. 108
      target/classes/com/dreamchaser/depository_manage/mapper/AccesstoAddressMapper.xml
  54. 35
      target/classes/com/dreamchaser/depository_manage/mapper/CallBackLogMapper.xml
  55. 168
      target/classes/com/dreamchaser/depository_manage/mapper/CompanyMapper.xml
  56. 363
      target/classes/com/dreamchaser/depository_manage/mapper/DepositoryMapper.xml
  57. 1229
      target/classes/com/dreamchaser/depository_manage/mapper/DepositoryRecordMapper.xml
  58. 728
      target/classes/com/dreamchaser/depository_manage/mapper/MaterialMapper.xml
  59. 260
      target/classes/com/dreamchaser/depository_manage/mapper/MaterialTypeMapper.xml
  60. 131
      target/classes/com/dreamchaser/depository_manage/mapper/NoticeMapper.xml
  61. 316
      target/classes/com/dreamchaser/depository_manage/mapper/PlaceMapper.xml
  62. 143
      target/classes/com/dreamchaser/depository_manage/mapper/QrCodeMapper.xml
  63. 138
      target/classes/com/dreamchaser/depository_manage/mapper/RoleMapper.xml
  64. 322
      target/classes/com/dreamchaser/depository_manage/mapper/StockTakingMapper.xml
  65. 153
      target/classes/com/dreamchaser/depository_manage/mapper/TransferRecordMapper.xml
  66. 385
      target/classes/com/dreamchaser/depository_manage/mapper/UserMapper.xml
  67. 143
      target/classes/com/dreamchaser/depository_manage/mapper/standingBookMapper.xml
  68. 155
      target/classes/logback-spring.xml
  69. 26
      target/classes/redisson-config.yml
  70. 4
      target/classes/static/api/clear.json
  71. 226
      target/classes/static/api/init.json
  72. 220
      target/classes/static/api/init_checker.json
  73. 226
      target/classes/static/api/init_reviewer.json
  74. 100
      target/classes/static/api/init_user.json
  75. 254
      target/classes/static/api/menus.json
  76. 139
      target/classes/static/api/table-in.json
  77. 136
      target/classes/static/api/table-out.json
  78. 95
      target/classes/static/api/table-user.json
  79. 87
      target/classes/static/api/tableSelect.json
  80. 225
      target/classes/static/api/test.json
  81. 10
      target/classes/static/api/upload.json
  82. 934
      target/classes/static/css/layuimini.css
  83. 99
      target/classes/static/css/public.css
  84. 95
      target/classes/static/css/themes/default.css
  85. BIN
      target/classes/static/images/bg.jpg
  86. BIN
      target/classes/static/images/cam.png
  87. BIN
      target/classes/static/images/captcha.jpg
  88. BIN
      target/classes/static/images/donate_qrcode.png
  89. BIN
      target/classes/static/images/favicon.ico
  90. BIN
      target/classes/static/images/home.png
  91. BIN
      target/classes/static/images/icon-login.png
  92. BIN
      target/classes/static/images/loginbg.png
  93. BIN
      target/classes/static/images/logo.jpg
  94. BIN
      target/classes/static/images/logo.png
  95. BIN
      target/classes/static/images/logo_back.ico
  96. BIN
      target/classes/static/images/logo_back.jpg
  97. BIN
      target/classes/static/images/logo_back.png
  98. BIN
      target/classes/static/images/search.ico
  99. BIN
      target/classes/static/images/search.png
  100. BIN
      target/classes/static/images/sousuo.png

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

@ -1139,6 +1139,7 @@ public class DepositoryController {
// 用于获取折线图
public Map<String,Object> getShowData(String type,UserByPort userByPort,Map<String,Integer> yesterdayData,List<String> depositoryName){
// 获取各仓库名称以及id
Map<String, Integer> depositoryAllNameAndId = depositoryService.findDepositoryAllNameAndId(userByPort);
@ -1164,7 +1165,6 @@ public class DepositoryController {
days.add(format);
}
List<Double> drCountbyDrName = new ArrayList<>();
// 定义线程
ExecutorService exs = Executors.newFixedThreadPool(depositoryAllNameAndId.size());
// 结果集

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

@ -221,6 +221,9 @@ public class DepositoryRecordController {
insert.put("applyRemark",map.get("applyRemark"+temp));
insert.put("code",map.get("code"+temp));
insert.put("price",map.get("price"+temp).toString());
insert.put("producedDate",map.get("producedDate"+temp));
insert.put("qrCode",map.get("qrCode"+temp));
insert.put("barCode",map.get("barCode"+temp));
if(placeId == -1) { // 如果插入到仓库
insert.put("placeId",0);
Integer add = depositoryRecordService.applicationInPlace(insert);
@ -508,6 +511,18 @@ public class DepositoryRecordController {
UserByPort checker = PageController.FindUserById(checkId,userToken);
simpleApplicationOutMinRecordP.setCheckerName(checker.getName());
}
List<MaterialAndProducedDate> materialAndProducedDateByMid = materialService.findMaterialAndProducedDateByMid(materialById.getId());
if (materialAndProducedDateByMid.size() > 0) {
// 获取距今生产日期远的(即生产日期最早的)
for (MaterialAndProducedDate materialAndProducedDate :
materialAndProducedDateByMid) {
if (materialAndProducedDate.getInventory() >= simpleApplicationOutMinRecordP.getQuantity()) {
String producedDate = DateUtil.TimeStampToDateTimeForMonth(materialAndProducedDate.getProducedDate());
simpleApplicationOutMinRecordP.setProducedDate(producedDate);
break;
}
}
}
simpleApplicationOutMinRecordP.setApplicantTime(DateUtil.TimeStampToDateTime(Long.valueOf(applicationOutRecordPById.getApplicantTime())));
simpleApplicationOutMinRecordP.setApplyRemark(applicationOutRecordPById.getApplyRemark());
@ -521,6 +536,7 @@ public class DepositoryRecordController {
simpleApplicationOutMinRecordP.setPid(placeByDid.getId());
simpleApplicationOutMinRecordP.setState(state);
applicationOutRecordMinList.add(simpleApplicationOutMinRecordP);
}
}
@ -1135,6 +1151,14 @@ public class DepositoryRecordController {
// 如果是仓库,则使用默认库位
map.put("placeId",0);
}
Object qrCode = map.get("qrCode");
Object barCode = map.get("barCode");
if(qrCode != null){
map.put("qrCode",qrCode);
}
if(barCode != null){
map.put("barCode",barCode);
}
RestResponse restResponse = depositoryRecordService.completeApplicationOutMinRecord(map, userToken,crypt);
return restResponse;
}

46
src/main/java/com/dreamchaser/depository_manage/controller/MaterialController.java

@ -10,6 +10,7 @@ import com.dreamchaser.depository_manage.pojo.*;
import com.dreamchaser.depository_manage.security.bean.UserToken;
import com.dreamchaser.depository_manage.service.*;
import com.dreamchaser.depository_manage.utils.CrudUtil;
import com.dreamchaser.depository_manage.utils.DateUtil;
import com.dreamchaser.depository_manage.utils.ObjectFormatUtil;
import com.sun.mail.imap.protocol.ID;
import org.springframework.beans.factory.annotation.Autowired;
@ -98,15 +99,14 @@ public class MaterialController {
break;
}
}
for (RoleAndDepository roleAndDepository : depositoryAndRole) {
if (list.size() < size) {
for (RoleAndDepository roleAndDepository : depositoryAndRole) {
Integer depositoryId = roleAndDepository.getDepositoryId();
if (didList.contains(depositoryId)) {
// 如果当前仓库编号存在
continue; // 跳过本次循环
}
map.put("depositoryId", depositoryId);
if (list.size() < size) {
// 如果当前数目不足
if (map.containsKey("page")) {
// 当前页
@ -126,7 +126,8 @@ public class MaterialController {
}
total += materialService.findMaterialByDepositoryCount(map);
}
} else {
}
else {
List<MaterialP> inventory = materialService.findInventory(map);
list.addAll(inventory);
total += materialService.findInventoryCount(map);
@ -1326,10 +1327,43 @@ public class MaterialController {
}
}
if(mp != null){
// 获取当前物料对应的生产日期
List<MaterialAndProducedDate> materialAndProducedDateByMid = materialService.findMaterialAndProducedDateByMid(mp.getId());
List<String> producedDateList = new ArrayList<>();
// 用于标志是否要更改数量
boolean flagForQuantity = true;
for (MaterialAndProducedDate materialAndProducedDate : materialAndProducedDateByMid) {
// 获取当前生产日期
producedDateList.add(DateUtil.TimeStampToDateTimeForMonth(materialAndProducedDate.getProducedDate()));
if(flagForQuantity) {
mp.setQuantity(materialAndProducedDate.getInventory());
flagForQuantity = false;
}
}
mp.setProducedDateList(producedDateList);
}
return new RestResponse(mp, 1, 200);
}
/**
* 用于根据当前物料与其生产日期获取对应库存容量
* @param map
* @param request
* @return
*/
@PostMapping("/findQuantityByProducedDate")
public RestResponse findQuantityByProducedDate(@RequestBody Map<String,Object> map,HttpServletRequest request){
Integer mid = ObjectFormatUtil.toInteger(map.get("mid"));
String producedDate = (String) map.get("producedDate");
map.put("producedDate",DateUtil.DateTimeByMonthToTimeStamp(producedDate));
MaterialAndProducedDate materialAndProducedDateByMidAndProducedDate = materialService.findMaterialAndProducedDateByMidAndProducedDate(map);
if(materialAndProducedDateByMidAndProducedDate != null){
return new RestResponse(materialAndProducedDateByMidAndProducedDate.getInventory());
}
return new RestResponse(0);
}
/**
* 用于查询当前扫描的二维码为仓库还是物料
@ -1345,9 +1379,12 @@ public class MaterialController {
Map<String, Object> result = new HashMap<>();
// 0为非法码,1为物料,2为库位,3为仓库
Integer flag = 0;
// 1为二维码2为条形码
Integer CodeType = 0;
if (materialCode != null) {
// 如果当前不为空,则扫描的为物料二维码
flag = 1;
CodeType = 1;
Material materialByCode = materialService.findMaterialByCode(materialCode);
result.put("material", materialByCode);
} else {
@ -1357,6 +1394,7 @@ public class MaterialController {
// 如果不为空,则扫描的为物料条形码
Material material = materialService.findMaterialById(materialByBarCode.getMid());
flag = 1;
CodeType = 2;
result.put("material", material);
} else {
// 如果为空,则扫描的可能为库位码

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

@ -1346,7 +1346,6 @@ public class PageController {
Integer departmentManagerState = stp.getDepartmentManagerState();
if (Integer.compare(departmentManagerState, 3) == 0) {
// 如果当前盘点记录未经过负责人处理
// 跳转到审核页面
mv.setViewName("pages/stockTaking/stockTakingReview");
} else {

2
src/main/java/com/dreamchaser/depository_manage/controller/StockTakingController.java

@ -102,6 +102,7 @@ public class StockTakingController {
param.put("newInventory",map.get("newInventory"+temp));
param.put("takingResult",map.get("takingResult"+temp));
param.put("inventory",map.get("inventory"+temp));
param.put("producedDate",map.get("producedDate"+temp));
param.put("temp",temp);
success += stockTakingService.insertStockTaking(param);
param.remove("id");
@ -113,6 +114,7 @@ public class StockTakingController {
param.put("newInventory",map.get("newInventory"));
param.put("takingResult",map.get("takingResult"));
param.put("inventory",map.get("inventory"));
param.put("producedDate",map.get("producedDate"));
success += stockTakingService.insertStockTaking(param);
Object mainId = param.get("mainId");

2
src/main/java/com/dreamchaser/depository_manage/entity/ApplicationInRecord.java

@ -8,7 +8,7 @@ public class ApplicationInRecord {
/**
* id
*/
private Integer id;
private Long id;
/**
* 入库物品编号
*/

29
src/main/java/com/dreamchaser/depository_manage/entity/Govthreeing.java

@ -0,0 +1,29 @@
package com.dreamchaser.depository_manage.entity;
import lombok.Data;
import java.util.List;
/**
* 对应行政组织树接口返回值
*/
@Data
public class Govthreeing {
private Integer id;
private String number;
private String name;
private Integer superior;
private Integer organizationtype;
private String abbreviation;
private Long time;
private String state;
private Integer wechatorganizationid;
private String superiorsun;
private Integer schoole;
private String kingdeeidrIAAAAENsrM567U;
private Integer ispower;
private String classname;
private Integer level;
private Integer isman;
private List<Govthreeing> child;
}

47
src/main/java/com/dreamchaser/depository_manage/entity/MaterialAndProducedDate.java

@ -0,0 +1,47 @@
package com.dreamchaser.depository_manage.entity;
import lombok.Data;
/**
* 当前批量入库物料与生产日期的对应
*/
@Data
public class MaterialAndProducedDate {
/**
* id
*/
private Integer id;
/**
* 入库编号
*/
private Integer inid;
/**
* 入库物料
*/
private Integer mid;
/**
* 入库数量
*/
private Integer quantity;
/**
* 使用数量
*/
private Integer expendnum;
/**
* 剩余库存
*/
private Integer inventory;
/**
* 生产日期
*/
private Long producedDate;
/**
* 入库时扫描的条码
*/
private String barCode;
/**
* 入库时扫描的二维码
*/
private String qrCode;
}

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

@ -688,10 +688,9 @@
<foreach collection="list" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</select>
<select id="findApplicationOutMinByCondition" parameterType="int" resultMap="applicationOutRecordMin">
select
<include refid="ApplicationOutRecordMinInfo" />

37
src/main/java/com/dreamchaser/depository_manage/mapper/MaterialMapper.java

@ -3,6 +3,7 @@ package com.dreamchaser.depository_manage.mapper;
import com.dreamchaser.depository_manage.entity.ExcelInfo;
import com.dreamchaser.depository_manage.entity.Material;
import com.dreamchaser.depository_manage.entity.MaterialAndBarCode;
import com.dreamchaser.depository_manage.entity.MaterialAndProducedDate;
import com.dreamchaser.depository_manage.pojo.MaterialP;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
@ -230,5 +231,41 @@ public interface MaterialMapper {
*/
List<Material> findMaterialByTypeIds(List<Long> list);
/**
* 添加当前批次下的物料与生产日期对应
* @param map
* @return
*/
Integer addMaterialAndProducedDate(Map<String,Object> map);
/**
* 根据物料id查询所有物料与生产日期的对应
* @param mid
* @return
*/
List<MaterialAndProducedDate> findMaterialAndProducedDateByMid(Integer mid);
/**
* 用于修改物料与生产日期对应关系
* @param map
* @return
*/
Integer updateMaterialAndProducedDate(Map<String,Object> map);
/**
* 用于修改物料与生产日期对应关系
* @param materialAndProducedDate
* @return
*/
Integer updateMaterialAndProducedDate(MaterialAndProducedDate materialAndProducedDate);
/**
* 根据物料id与生产日期获取对应关系
* @param map
* @return
*/
MaterialAndProducedDate findMaterialAndProducedDateByMidAndProducedDate(Map<String,Object> map);
}

112
src/main/java/com/dreamchaser/depository_manage/mapper/MaterialMapper.xml

@ -59,6 +59,19 @@
<result column="introduce" property="introduce" jdbcType="VARCHAR" />
</association>
</resultMap>
<!-- 当前批次中物料与生产日期字段映射-->
<resultMap id="MaterialAndProducedDate" type="com.dreamchaser.depository_manage.entity.MaterialAndProducedDate">
<id column="id" property="id" jdbcType="INTEGER" />
<result column="inid" property="inid" jdbcType="INTEGER" />
<result column="mid" property="mid" jdbcType="INTEGER" />
<result column="quantity" property="quantity" jdbcType="INTEGER" />
<result column="expendnum" property="expendnum" jdbcType="INTEGER" />
<result column="inventory" property="inventory" jdbcType="INTEGER" />
<result column="producedDate" property="producedDate" jdbcType="INTEGER" />
<result column="barCode" property="barCode" jdbcType="VARCHAR" />
<result column="qrCode" property="qrCode" jdbcType="VARCHAR" />
</resultMap>
<!-- 条形码与物料对应-->
<resultMap id="BarCodeAndMaterialMap" type="com.dreamchaser.depository_manage.entity.MaterialAndBarCode">
@ -94,6 +107,10 @@
<sql id="allColumnsAndTypeNameOnView">
id,depository_id,mname,quantity,price,type_id,state,tname,dname,version,amounts ,unit ,texture,code,depositoryCode,producedDate,shelfLife,productionPlace,brand,remark
</sql>
<sql id="allColumnsByMaterialAndProducedDate">
mp.id,mp.inid,mp.mid,mp.quantity,mp.expendnum,mp.inventory,mp.producedDate,mp.barCode,mp.qrCode
</sql>
@ -202,8 +219,27 @@
</if>
</select>
<!-- 根据物料id查询所有物料与生产日期的对应-->
<select id="findMaterialAndProducedDateByMid" resultMap="MaterialAndProducedDate" parameterType="int">
select
<include refid="allColumnsByMaterialAndProducedDate"/>
from materialandproduceddate mp
where mp.mid = #{mid} and mp.inventory != 0 ORDER BY producedDate
</select>
<!-- 根据物料id与生产日期获取对应关系-->
<select id="findMaterialAndProducedDateByMidAndProducedDate" resultMap="MaterialAndProducedDate" parameterType="map">
select
<include refid="allColumnsByMaterialAndProducedDate"/>
from materialandproduceddate mp
where 1 = 1
<if test="mid != null and mid != ''">
and mp.mid = #{mid}
</if>
<if test="producedDate != null">
and mp.producedDate = #{producedDate}
</if>
</select>
<!--根据条件查询库存-->
<select id="findInventory" resultMap="materialMap" parameterType="map">
@ -503,6 +539,22 @@
)
</insert>
<!-- 添加当前批次物料与生产日期对应-->
<insert id="addMaterialAndProducedDate" useGeneratedKeys="true" keyProperty="id">
insert into materialandproduceddate(id,inid,mid,quantity,expendnum,inventory,producedDate,barCode,qrCode)
values (
#{id},
#{inid},
#{mid},
#{quantity},
#{expendnum},
#{inventory},
#{producedDate},
#{barCode},
#{qrCode}
)
</insert>
<insert id="addBarCodeAndMcode" parameterType="map">
insert into barcodeandmaterial(id,barCode,mcode)
values (
@ -564,6 +616,38 @@
</delete>
<update id="updateMaterialAndProducedDate">
update materialandproduceddate
<set>
<if test="inid != null and inid != ''">
inid = #{inid},
</if>
<if test="mid != null and mid != ''">
mid = #{mid},
</if>
<if test="quantity != null">
quantity = #{quantity},
</if>
<if test="expendnum != null">
expendnum = #{expendnum},
</if>
<if test="inventory != null">
inventory = #{inventory},
</if>
<if test="producedDate != null">
producedDate = #{producedDate},
</if>
<if test="barCode != null">
barCode = #{barCode},
</if>
<if test="qrCode != null">
qrCode = #{qrCode}
</if>
</set>
where id = #{id}
</update>
<!-- 修改数据 -->
<update id="updateMaterial">
@ -655,30 +739,6 @@
depository_id = #{depositoryId} and mname = #{mname},
</update>
<!-- 批量修改数据
<update id="updateMaterials" parameterType="list">
<foreach collection="list" index="index" item="item" separator=";">
UPDATE material
<set>
<if test="item.depositoryId != null">
depository_id = #{item.depositoryId},
</if>
<if test="item.mname != null">
mname = #{item.mname},
</if>
<if test="item.quantity != null">
quantity = #{item.quantity},
</if>
<if test="item.price != null">
price = #{item.price},
</if>
<if test="item.typeId != null">
type_id = #{item.typeId}
</if>
</set>
WHERE id = #{item.id}
</foreach>
</update>-->
<!-- 根据主键删除数据 -->
@ -725,4 +785,6 @@
#{id}
</foreach>
</update>
</mapper>

15
src/main/java/com/dreamchaser/depository_manage/mapper/StockTakingMapper.xml

@ -35,6 +35,7 @@
<result column="mcode" property="mcode" jdbcType="VARCHAR" />
<result column="mname" property="mname" jdbcType="VARCHAR" />
<result column="mtId" property="mtId" jdbcType="INTEGER" />
<result column="producedDate" property="producedDate" jdbcType="INTEGER" />
</resultMap>
@ -46,7 +47,7 @@
</sql>
<sql id="StockTakingChildPAllColumns">
id,mid,oldInventory,newInventory,inventory,mainId,takingResult,mname,mtId,tname,mcode,mversion,munit,mtexture
id,mid,oldInventory,newInventory,inventory,mainId,takingResult,mname,mtId,tname,mcode,mversion,munit,mtexture,producedDate
</sql>
<!-- 插入主表-->
@ -67,9 +68,9 @@
<!-- 插入子表-->
<insert id="insertStockTakingChild" useGeneratedKeys="true" keyProperty="id">
INSERT INTO stocktakingchild (id,mid,oldInventory,newInventory,takingResult,inventory,mainId)
INSERT INTO stocktakingchild (id,mid,oldInventory,newInventory,takingResult,inventory,mainId,producedDate)
values (
#{id},#{mid},#{oldInventory},#{newInventory},#{takingResult},#{inventory},#{mainId}
#{id},#{mid},#{oldInventory},#{newInventory},#{takingResult},#{inventory},#{mainId},#{producedDate}
)
</insert>
@ -159,7 +160,10 @@
inventory = #{inventory},
</if>
<if test="mainId != null and mainId != ''">
mainId = #{mainId}
mainId = #{mainId},
</if>
<if test="producedDate != null and producedDate != ''">
producedDate = #{producedDate}
</if>
</set>
where id = #{id}
@ -250,6 +254,9 @@
<if test="mtexture != null and mtexture != ''">
and mtexture = #{mtexture}
</if>
<if test="producedDate != null">
and producedDate = #{producedDate}
</if>
</select>
<select id="selectStockTakingById" resultMap="StockTakingMap">

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

@ -43,6 +43,11 @@ public class AdministrationP {
*/
private Integer state;
/**
* 上级
*/
private Integer superior;
public AdministrationP(Administration administration) {
this.id = administration.getId();
this.number = administration.getNumber();

17
src/main/java/com/dreamchaser/depository_manage/pojo/MaterialP.java

@ -152,6 +152,23 @@ public class MaterialP {
*/
private Long shelfLifeForCalc;
/**
* 保质期,用于表格展示
*/
private String tableShowShelfLife;
/**
* 预警数量
*/
private Integer warningCount;
/**
* 该物料生产日期列表
*/
private List<String> producedDateList;
public MaterialP(Integer id, Integer depositoryId, String mname, Integer quantity, Double price, String typeName) {
this.id = id;

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

@ -71,6 +71,11 @@ public class SimpleApplicationOutMinRecordP {
*/
private String checkerName;
/**
* 要出库物料的生产日期
*/
private String producedDate;
public SimpleApplicationOutMinRecordP(ApplicationOutRecordMin applicationOutRecordMin) {
this.id = applicationOutRecordMin.getId();
this.parentId = applicationOutRecordMin.getParentId();

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

@ -91,6 +91,11 @@ public class StockTakingChildP {
*/
private Long mainId;
/**
* 当前盘点物料选择的生产日期
*/
private Long producedDate;
}

19
src/main/java/com/dreamchaser/depository_manage/service/MaterialService.java

@ -1,9 +1,6 @@
package com.dreamchaser.depository_manage.service;
import com.dreamchaser.depository_manage.entity.ExcelInfo;
import com.dreamchaser.depository_manage.entity.Material;
import com.dreamchaser.depository_manage.entity.MaterialAndBarCode;
import com.dreamchaser.depository_manage.entity.MaterialType;
import com.dreamchaser.depository_manage.entity.*;
import com.dreamchaser.depository_manage.pojo.MaterialP;
import java.util.List;
@ -271,4 +268,18 @@ public interface MaterialService {
* @return
*/
Integer getMtLevel(MaterialType mt,Integer level);
/**
* 根据物料id查询
* @param mid
* @return
*/
List<MaterialAndProducedDate> findMaterialAndProducedDateByMid(Integer mid);
/**
* 根据物料id与生产日期获取对应关系
* @param map
* @return
*/
MaterialAndProducedDate findMaterialAndProducedDateByMidAndProducedDate(Map<String,Object> map);
}

189
src/main/java/com/dreamchaser/depository_manage/service/impl/CompanyServiceImpl.java

@ -1,5 +1,6 @@
package com.dreamchaser.depository_manage.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.dreamchaser.depository_manage.config.PortConfig;
@ -154,9 +155,9 @@ public class CompanyServiceImpl implements CompanyService {
// 获取当前用户登录的公司
Map<String,Object> map = new HashMap<>();
map.put("superior",userToken.getCompany().toString());
List<AdministrationP> objectList = FindallCompanyByParent(map,userToken);
List<AdministrationP> administrationPList = findAllCompanyByParent(map, userToken);
// 开启对应数量的线程
ExecutorService exs = Executors.newFixedThreadPool(objectList.size());
ExecutorService exs = Executors.newFixedThreadPool(administrationPList.size());
// 结果集
List<Object> list = new ArrayList<>();
List<Future<Object>> futureList = new ArrayList<Future<Object>>();
@ -164,13 +165,13 @@ public class CompanyServiceImpl implements CompanyService {
// 1.定义CompletionService
CompletionService<Object> completionService = new ExecutorCompletionService<Object>(exs);
for (int i = 0; i < objectList.size(); i++) {
AdministrationP o = objectList.get(i);
Future<Object> future = completionService.submit(new Task(o,userToken));
for (int i = 0; i < administrationPList.size(); i++) {
AdministrationP administrationP = administrationPList.get(i);
Future<Object> future = completionService.submit(new InitManagerForAdministration(administrationP,userToken));
futureList.add(future);
}
// 3.获取结果
for(int i=0;i<objectList.size();i++){
for (int i = 0; i < administrationPList.size(); i++) {
Object result = null;
try {
result = completionService.take().get();
@ -184,110 +185,40 @@ public class CompanyServiceImpl implements CompanyService {
return list;
}
// 构造树形组件数据模板
public Map<String,Object> InitTreeMenus(AdministrationP ap, List<Object> children){
if(ap != null) {
Map<String, Object> map = new HashMap<>();
map.put("title",ap.getName());
map.put("id", ap.getId());
map.put("children",children);
return map;
}
else{
return null;
}
}
class InitManagerForAdministration implements Callable<Object>{
// 根据id获取子类
public List<Object> findChildForMaterialTypeByParent(AdministrationP ap,UserByPort userByPort){
Map<String,Object> param = new HashMap<>();
List<Object> result = new ArrayList<>();
Map<String,Object> children = new HashMap<>();
param.put("superior",ap.getId().toString());
// 获取当前父类的子类
List<AdministrationP> administrationPList = FindallCompanyByParent(param, userByPort);
if(administrationPList.size() > 0){
// 如果还有部门
for (int i = 0; i < administrationPList.size(); i++) {
AdministrationP administrationP = administrationPList.get(i);
List<Object> childForMaterialTypeByParent = findChildForMaterialTypeByParent(administrationP,userByPort);
if(childForMaterialTypeByParent != null && administrationP.getLevel() != 4) {
// 如果子类不为空
result.add(InitTreeMenus(administrationP, childForMaterialTypeByParent));
}else{
// 为当前部门添加部门负责人
List<Object> objectList = addDepartMentHead(administrationP, userByPort);
result.add(InitTreeMenus(administrationP,objectList));
}
}
return result;
}else{
return null;
}
}
// 用于执行线程任务
class Task implements Callable<Object> {
AdministrationP ap;
UserByPort userByPort;
AdministrationP administrationP;
UserByPort userToken;
public Task(AdministrationP ap,UserByPort userByPort){
this.ap = ap;
this.userByPort = userByPort;
InitManagerForAdministration(AdministrationP administrationP,UserByPort userToken){
this.administrationP = administrationP;
this.userToken = userToken;
}
@Override
public Object call() throws Exception {
List<Object> childForMaterialTypeByParent = findChildForMaterialTypeByParent(ap,userByPort);
Map<String, Object> stringObjectMap = null;
if(childForMaterialTypeByParent == null){
List<Object> objectList = addDepartMentHead(ap, userByPort);
stringObjectMap = InitTreeMenus(ap,objectList);
}else{
stringObjectMap = InitTreeMenus(ap,childForMaterialTypeByParent);
}
return stringObjectMap;
}
}
/**
* 用于给当前部门添加部门负责人
* @param ap
* @return
*/
public List<Object> addDepartMentHead(AdministrationP ap,UserByPort userToken){
// 获取当前部门的部门负责人
Map<String,Object> map = new HashMap<>();
map.put("adminorg",ap.getId());
List<UserByPort> departmentHeadByUser = findDepartmentHeadByUser(map, userToken);
List<Object> result = new ArrayList<>();
for (int i = 0; i < departmentHeadByUser.size(); i++) {
UserByPort user = departmentHeadByUser.get(i);
Map<String, Object> children = new HashMap<>();
children.put("title",user.getName());
children.put("id",user.getId());
result.add(children);
List<UserByPort> allUserByAdministration = findAllUserByAdministration(administrationP.getId(), userToken);
List<Object> objectList = addDepartmentHead(administrationP, allUserByAdministration);
Map<String, Object> map = InitTreeMenus(administrationP, objectList);
return map;
}
return result;
}
/**
* 用于获取当前行政组织的子类
* @param map
* @param userToken
* 用于获取当前公司下所有部门
* @param map 查询条件
* @param userToken 登录用户
* @return
*/
public List<AdministrationP> FindallCompanyByParent(Map<String,Object> map, UserByPort userToken){
public List<AdministrationP> findAllCompanyByParent(Map<String,Object> map, UserByPort userToken){
String url = PortConfig.external_url +"/org/govlist";
String superior = (String) map.get("superior");
if(superior == null || "".equals(superior)){
superior = "313";
superior = "309";
}
map.put("superior",superior);
map.put("state",1);
map.put("level",4);
String jsonString = JSONObject.toJSONString(map);
JSONObject paramObject = JSONObject.parseObject(jsonString);
String post = null;
@ -312,6 +243,76 @@ public class CompanyServiceImpl implements CompanyService {
}
/**
* 用于获取当前部门下所有的人
* @param adminorg 部门id
* @param userToken 登录用户
* @return
*/
public List<UserByPort> findAllUserByAdministration(Integer adminorg,UserByPort userToken){
String url = PortConfig.external_url +"/staff/archiveslist";
Map<String,Object> map = new HashMap<>();
map.put("adminorg",adminorg);
String jsonString = JSONObject.toJSONString(map);
JSONObject paramObject = JSONObject.parseObject(jsonString);
String post = null;
try {
post = HttpUtils.send(url,paramObject, HTTP.UTF_8,userToken);
} catch (IOException e) {
e.printStackTrace();
}
JSONObject jsonObject = JSONObject.parseObject(post);
JSONObject data = (JSONObject) jsonObject.get("data");
JSONArray list = (JSONArray) data.get("list");
if(list == null){
list = new JSONArray();
}
List<UserByPort> userByPortList = new ArrayList<>();
for (int i = 0; i < list.size(); i++) {
UserByPort userByPort = JSONObject.toJavaObject((JSON) list.get(i), UserByPort.class);
if(Integer.compare(userByPort.getPersonincharge(),1) == 0) {
userByPortList.add(userByPort);
}
}
return userByPortList;
}
/**
* 用于给当前部门添加部门负责人
* @param ap
* @return
*/
public List<Object> addDepartmentHead(AdministrationP ap,List<UserByPort> departmentHeadByUser){
// 获取当前部门的部门负责人
Map<String,Object> map = new HashMap<>();
map.put("adminorg",ap.getId());
List<Object> result = new ArrayList<>();
for (int i = 0; i < departmentHeadByUser.size(); i++) {
UserByPort user = departmentHeadByUser.get(i);
Map<String, Object> children = new HashMap<>();
children.put("title",user.getName());
children.put("id",user.getId());
result.add(children);
}
return result;
}
// 构造树形组件数据模板
public Map<String,Object> InitTreeMenus(AdministrationP ap, List<Object> children){
if(ap != null) {
Map<String, Object> map = new HashMap<>();
map.put("title",ap.getName());
map.put("id", ap.getId());
map.put("children",children);
return map;
}
else{
return null;
}
}
/**
* 用于获取当前部门的负责人
* @param map

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

@ -88,6 +88,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService {
* @return
*/
@Override
@Transactional
public Integer applicationIn(Map<String, Object> map) {
Integer depositoryId = ObjectFormatUtil.toInteger(map.get("depositoryId"));
Depository depositoryRecordById = depositoryMapper.findDepositoryById(depositoryId);
@ -105,6 +106,11 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService {
if (depositoryRecordById.getMaxNumber() - Inventory < quantity) {
return 0;
}
// 获取当前填写的生产日期
Long producedDate = Long.valueOf(0);
if (map.containsKey("producedDate")) {
producedDate = DateUtil.DateTimeByMonthToTimeStamp(map.get("producedDate").toString());
}
Map<String, Object> param = new HashMap<>();
param.put("depositoryId", depositoryId);
param.put("code", material.getCode());
@ -120,6 +126,10 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService {
map.put("applicant_time", DateUtil.DateTimeToTimeStamp(simpleTime));
map.put("code", code);
// 获取当前物料
// 获取当前入库物料id
Integer newMid = 0;
if (materialByCondition.size() > 0) { // 如果当前存在
Material mt = materialByCondition.get(0);
map.put("oldPrice", mt.getPrice());
@ -127,7 +137,9 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService {
mt.setAmounts(mt.getAmounts() + amounts);
mt.setQuantity((int) (mt.getQuantity() + quantity));
mt.setPrice(avgPrice);
mt.setProducedDate(producedDate);
materialMapper.updateMaterial(mt);
newMid = mt.getId();
} else {
Map<String, Object> insert = new HashMap<>();
Material materialById = materialMapper.findMaterialById(mid);
@ -142,8 +154,13 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService {
insert.put("texture", materialById.getTexture());
insert.put("amounts", amounts);
insert.put("depositoryCode", materialById.getDepositoryCode());
insert.put("shelfLife", materialById.getShelfLife());
insert.put("producedDate", producedDate);
materialMapper.insertMaterial(insert);
newMid = ObjectFormatUtil.toInteger(insert.get("id"));
}
// 将新入库的物料id记录下来
map.put("newInMid", newMid);
return depositoryRecordMapper.insertApplicationInRecord(map);
}
@ -254,6 +271,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService {
* @return
*/
@Override
@Transactional
public Integer applicationInPlace(Map<String, Object> map) {
Integer placeId = ObjectFormatUtil.toInteger(map.get("placeId"));
if (placeId == null) {
@ -271,6 +289,37 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService {
if (integer != 1) {
return -1;
}
// 获取当前入库的物料id
Integer newInMid = ObjectFormatUtil.toInteger(map.get("newInMid"));
// 获取当前入库记录id
Integer InId = ObjectFormatUtil.toInteger(map.get("id"));
Map<String, Object> insertProducedDate = new HashMap<>();
insertProducedDate.put("inid", InId);
insertProducedDate.put("mid", newInMid);
if (map.containsKey("producedDate")) {
Long producedDate = DateUtil.DateTimeByMonthToTimeStamp(map.get("producedDate").toString());
insertProducedDate.put("producedDate", producedDate);
}
// 查找当前物料id与生产日期的对应关系
MaterialAndProducedDate materialAndProducedDateByMidAndProducedDate = materialMapper.findMaterialAndProducedDateByMidAndProducedDate(insertProducedDate);
if(materialAndProducedDateByMidAndProducedDate != null){
// 增加当前数量
materialAndProducedDateByMidAndProducedDate.setQuantity(materialAndProducedDateByMidAndProducedDate.getQuantity() + quantity);
materialAndProducedDateByMidAndProducedDate.setInventory(materialAndProducedDateByMidAndProducedDate.getInventory() + quantity);
// 修改
materialMapper.updateMaterialAndProducedDate(materialAndProducedDateByMidAndProducedDate);
}else {
insertProducedDate.put("quantity", quantity);
insertProducedDate.put("inventory", quantity);
insertProducedDate.put("expendnum", 0);
insertProducedDate.put("barCode", map.get("barCode"));
insertProducedDate.put("qrCode", map.get("qrCode"));
// 插入一条新记录
materialMapper.addMaterialAndProducedDate(insertProducedDate);
}
// 获取当前库存记录
Map<String, Object> param = new HashMap<>();
param.put("code", materialById.getCode());
@ -491,21 +540,23 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService {
if (material.getQuantity() >= record.getQuantity() && flag) {
// 当前出库金额
Double sum = material.getPrice() * record.getQuantity();
// 当前出库数量
Integer quantity = applicationOutMinById.getQuantity();
material.setAmounts(material.getAmounts() - sum);
material.setQuantity(material.getQuantity() - applicationOutMinById.getQuantity());
material.setNumberOfTemporary(material.getNumberOfTemporary() - applicationOutMinById.getQuantity());
material.setQuantity(material.getQuantity() - quantity);
material.setNumberOfTemporary(material.getNumberOfTemporary() - quantity);
// 修改物料信息
materialMapper.updateMaterial(material);
if (placeAndMaterialByMidAndPid != null) { //如果库位不为空
// 修改当前库位存放物料的数量
placeAndMaterialByMidAndPid.setQuantity(placeAndMaterialByMidAndPid.getQuantity() - applicationOutMinById.getQuantity());
placeAndMaterialByMidAndPid.setQuantity(placeAndMaterialByMidAndPid.getQuantity() - quantity);
placeMapper.updateMaterialAndPlace(placeAndMaterialByMidAndPid);
}
// 修改库位数量
Place placeById = placeMapper.findPlaceById(placeId);
placeById.setQuantity(placeById.getQuantity() - applicationOutMinById.getQuantity());
placeById.setQuantity(placeById.getQuantity() - quantity);
placeMapper.UpdatePlace(placeById);
@ -637,6 +688,33 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService {
restResponse.setStatus(200);
restResponse.setData("");
restResponse.setStatusInfo(new StatusInfo("出库成功", "出库成功"));
// 更新入库批次中的物料数量
new Thread(new Runnable() {
@Override
public void run() {
// 获取出库物料id
Integer mid = material.getId();
// 获取当前物料对应的生产日期
List<MaterialAndProducedDate> materialAndProducedDateByMid = materialMapper.findMaterialAndProducedDateByMid(mid);
if (materialAndProducedDateByMid.size() > 0) {
// 获取距今生产日期远的(即生产日期最早的)
for (MaterialAndProducedDate materialAndProducedDate :
materialAndProducedDateByMid) {
if (materialAndProducedDate.getInventory() > quantity) {
// 设置使用的数量
materialAndProducedDate.setExpendnum(materialAndProducedDate.getExpendnum() + quantity);
// 设置剩余的数量
materialAndProducedDate.setInventory(materialAndProducedDate.getInventory() - quantity);
materialMapper.updateMaterialAndProducedDate(materialAndProducedDate);
// 跳出循环
break;
}
}
}
}
}).start();
} else {
restResponse.setStatus(508);
restResponse.setData("");
@ -1008,8 +1086,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService {
qyWxOperationService.sendMessageForOtherUserByCard(ObjectFormatUtil.toInteger(id), s, userAgent, 1);
}
}).start();
}
else {
} else {
String result = "";
// 开启线程更改其他用户卡片模板样式
String simpleTime = DateUtil.getSimpleTime(new Date());
@ -1929,12 +2006,12 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService {
List<Long> allMtByParent = findChildForMaterialTypeByParent(mt);
if (type == 1) {
// 如果入库
map.put("list",allMtByParent);
sumCount = depositoryRecordMapper.findApplicationInByMonthTest(map);
map.put("list", allMtByParent);
sumCount = depositoryRecordMapper.findApplicationInByMonthTest(map);
} else {
// 如果出库
map.put("list",allMtByParent);
map.put("list", allMtByParent);
sumCount = depositoryRecordMapper.findApplicationInByMonthTest(map);
}
return sumCount;
@ -1946,11 +2023,11 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService {
Integer type = ObjectFormatUtil.toInteger(map.get("type"));
Object o = map.get("oldId");
List<Long> allMtByParent = null;
if(o!=null){
if (o != null) {
String oldId = String.valueOf(o);
MaterialType mt = materialTypeMapper.findMaterialTypeByOldId(Long.valueOf(oldId));
allMtByParent = findChildForMaterialTypeByParent(mt);
map.put("list",allMtByParent);
map.put("list", allMtByParent);
}
Integer sumCount = 0;
if (type == 1) {
@ -1964,7 +2041,6 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService {
}
/**
* 查询仓库当天流水
*
@ -2139,7 +2215,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService {
List<MaterialType> materialTypeAll = materialTypeMapper.findMaterialTypeAll();
for (int i = 0; i < materialTypeAll.size(); i++) {
MaterialType materialType = materialTypeAll.get(i);
if(isTrueForParent(parentId,materialType.getParentId())){
if (isTrueForParent(parentId, materialType.getParentId())) {
parentId.add(materialType.getOldId());
result.add(materialType.getOldId());
}
@ -2154,7 +2230,7 @@ public class DepositoryRecordServiceImpl implements DepositoryRecordService {
* @param id
* @return
*/
public Boolean isTrueForParent(List<Long> parentList,Long id){
public Boolean isTrueForParent(List<Long> parentList, Long id) {
for (Long aLong : parentList) {
if (Long.compare(aLong, id) == 0) {
return true;

107
src/main/java/com/dreamchaser/depository_manage/service/impl/MaterialServiceImpl.java

@ -67,14 +67,28 @@ public class MaterialServiceImpl implements MaterialService {
map.put("amounts", quantity * price);
}
// 判断是否有保质期
Integer shelfLife = 0;
if (map.containsKey("shelfLife")) {
Long shelfLife = DateUtil.DateTimeByMonthToTimeStamp(map.get("shelfLife").toString());
map.put("shelfLife", shelfLife);
String shelfLife1 = (String) map.get("shelfLife");
if(!("".equals(shelfLife1))){
shelfLife = ObjectFormatUtil.toInteger(shelfLife1);
}
}
if (map.containsKey("producedDate")) {
Long producedDate = DateUtil.DateTimeByMonthToTimeStamp(map.get("producedDate").toString());
map.put("producedDate", producedDate);
}
String dateType = (String) map.get("dateType");
// 1年2月3天
if("day".equals(dateType) && shelfLife != 0){
map.put("shelfLife",ObjectFormatUtil.toInteger("3"+shelfLife));
}else if("month".equals(dateType) && shelfLife != 0){
map.put("shelfLife",ObjectFormatUtil.toInteger("2"+shelfLife));
}else if("year".equals(dateType) && shelfLife != 0){
map.put("shelfLife",ObjectFormatUtil.toInteger("1"+shelfLife));
}else{
map.remove("shelfLife");
}
// 获取当前类型
if (map.containsKey("typeId")) {
Integer typeId = ObjectFormatUtil.toInteger(map.get("typeId").toString());
@ -123,9 +137,18 @@ public class MaterialServiceImpl implements MaterialService {
map.put("price", price);
}
// 判断是否有保质期
String dateType = (String) map.get("dateType");
// 1年2月3天
Integer shelfLife = 0;
if (map.containsKey("shelfLife")) {
Long shelfLife = DateUtil.DateTimeByMonthToTimeStamp(map.get("shelfLife").toString());
map.put("shelfLife", shelfLife);
shelfLife = ObjectFormatUtil.toInteger(map.get("shelfLife"));
}
if("day".equals(dateType)){
map.put("shelfLife",ObjectFormatUtil.toInteger("3"+shelfLife));
}else if("month".equals(dateType)){
map.put("shelfLife",ObjectFormatUtil.toInteger("2"+shelfLife));
}else if("year".equals(dateType)){
map.put("shelfLife",ObjectFormatUtil.toInteger("1"+shelfLife));
}
if (map.containsKey("producedDate")) {
Long producedDate = DateUtil.DateTimeByMonthToTimeStamp(map.get("producedDate").toString());
@ -301,10 +324,20 @@ public class MaterialServiceImpl implements MaterialService {
if (producedDate != null) {
material.setShowProducedDate(DateUtil.TimeStampToDateTimeForMonth(producedDate));
}
Long shelfLife = material.getShelfLife();
if (shelfLife != null) {
Long life = material.getShelfLife();
if(life != null) {
String shelfLife = String.valueOf(life);
String dateType = shelfLife.substring(0, 1);
if("1".equals(dateType)){
material.setShowShelfLife("year");
}else if("2".equals(dateType)){
material.setShowShelfLife("month");
}else if("3".equals(dateType)){
material.setShowShelfLife("day");
}
//1年2月3天,后面为数目
material.setShowShelfLife(DateUtil.TimeStampToDateTimeForMonth(shelfLife));
material.setShelfLife(Long.valueOf(shelfLife.substring(1, shelfLife.length())));
}
return material;
}
@ -405,6 +438,7 @@ public class MaterialServiceImpl implements MaterialService {
List<MaterialP> result = new ArrayList<>(list.size());
for (Material material : list) {
MaterialP m = new MaterialP(material);
Integer warningCount = 0;
Integer depositoryId = material.getDepositoryId();
if (depositoryId != null) {
m.setDepositoryName(depositoryMapper.findDepositoryNameById(depositoryId));
@ -414,14 +448,42 @@ public class MaterialServiceImpl implements MaterialService {
if (producedDate != null) {
m.setProducedDate(DateUtil.TimeStampToDateTimeForMonth(producedDate));
}
Long shelfLife = material.getShelfLife();
if (shelfLife != null) {
m.setShelfLife(DateUtil.TimeStampToDateTimeForMonth(shelfLife));
// 设置当前物料保质期的具体时间
Long calcShelfLife = Long.valueOf(0);
String currentDate = DateUtil.getCurrentDate();
// 获取当天时间
Long nowDay = DateUtil.DateTimeByMonthToTimeStamp(currentDate);
Long life = material.getShelfLife();
if(life != null) {
String shelfLife = String.valueOf(life);
String dateType = shelfLife.substring(0, 1);
String dateTime = shelfLife.substring(1, shelfLife.length());
if("1".equals(dateType)){
m.setShelfLife(dateTime+"年");
calcShelfLife = ObjectFormatUtil.toLong(dateTime) * 365 * DateUtil.dayTime;
}else if("2".equals(dateType)){
m.setShelfLife(dateTime+"月");
calcShelfLife = ObjectFormatUtil.toLong(dateTime) * 30 * DateUtil.dayTime;
}else if("3".equals(dateType)){
m.setShelfLife(dateTime+"天");
calcShelfLife = ObjectFormatUtil.toLong(dateTime) * DateUtil.dayTime;
}
// 获取当前没有使用完成的物料对应的生产日期对应
List<MaterialAndProducedDate> materialAndProducedDateByMid = materialMapper.findMaterialAndProducedDateByMid(m.getId());
for (MaterialAndProducedDate materialAndProducedDate : materialAndProducedDateByMid) {
// 获取当前入库时的生产日期
Long producedDate1 = materialAndProducedDate.getProducedDate();
// 如果可使用时间(生产时间+保质期)减去当天时间 小于预警时间
if((producedDate1 + calcShelfLife) - nowDay < DateUtil.warningTime){
warningCount += materialAndProducedDate.getInventory();
}
}
}
MaterialType materialTypeByOldId = materialTypeMapper.findMaterialTypeByOldId(material.getMaterialTypeId());
m.setTypeName(materialTypeByOldId.getTname());
m.setTypeId(materialTypeByOldId.getOldId());
m.setWarningCount(warningCount);
result.add(m);
}
return result;
@ -847,6 +909,29 @@ public class MaterialServiceImpl implements MaterialService {
}
}
@Override
public List<MaterialAndProducedDate> findMaterialAndProducedDateByMid(Integer mid) {
return materialMapper.findMaterialAndProducedDateByMid(mid);
}
/**
* 根据物料id与生产日期获取对应关系
* @param map
* @return
*/
@Override
public MaterialAndProducedDate findMaterialAndProducedDateByMidAndProducedDate(Map<String, Object> map) {
return materialMapper.findMaterialAndProducedDateByMidAndProducedDate(map);
}
/**
* 重构树结构
* @param childrenList
* @param stringObjectMap
* @param flag
* @param mt
* @return
*/
public List<Object> rewriteTree(List<Object> childrenList, Map<String, Object> stringObjectMap, Integer flag, MaterialType mt) {
if (flag != 1) {
mt = materialTypeMapper.findMaterialTypeByOldId(mt.getParentId());

264
src/main/java/com/dreamchaser/depository_manage/service/impl/StockTakingServiceImpl.java

@ -27,6 +27,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal;
import java.util.*;
import java.util.concurrent.TimeUnit;
@ -109,7 +110,14 @@ public class StockTakingServiceImpl implements StockTakingService {
materialMapper.addBarCodeAndMaterialForMoreOne(param);
}
}
if(map.containsKey("producedDate")){
String producedDate = (String) map.get("producedDate");
if(!"".equals(producedDate)){
map.put("producedDate",DateUtil.DateTimeByMonthToTimeStamp(producedDate));
}else{
map.remove("producedDate");
}
}
return stockTakingMapper.insertStockTakingChild(map);
}
@ -368,6 +376,8 @@ public class StockTakingServiceImpl implements StockTakingService {
// 新的均价
avgPrice = (amounts / newInventory) * 100;
BigDecimal bg = new BigDecimal(avgPrice);
avgPrice = bg.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
}
materialById.setPrice(avgPrice);
@ -570,6 +580,7 @@ public class StockTakingServiceImpl implements StockTakingService {
// 获取所有子单
List<StockTakingChildP> minRecordList = stockTakingMapper.selectStockTakingChildByMainId(mainId);
for (int i = 0; i < minRecordList.size(); i++) {
// 获取子单详情
StockTakingChildP minRecord = minRecordList.get(i);
// 获取盘点的物料详情
@ -581,41 +592,104 @@ public class StockTakingServiceImpl implements StockTakingService {
continue;
}
// 获取盈亏数量
Integer inventory = minRecord.getInventory();
// 获取盘点物料信息
Material materialById = materialMapper.findMaterialById(minRecord.getMid());
Map<String, Object> paramForMaterialAndPlace = new HashMap<>();
paramForMaterialAndPlace.put("mid", materialById.getId());
paramForMaterialAndPlace.put("pid", placeById.getId());
// 获取物料与库位的对应关系
MaterialAndPlace placeAndMaterialByMidAndPid = placeMapper.findPlaceAndMaterialByMidAndPid(paramForMaterialAndPlace);
// 根据盘点结果重新计算物料的单价
// 获取判断对应的生产日期
Long producedDate = minRecord.getProducedDate();
// 数据库中的总额
Double amounts = (materialById.getAmounts() / 100);
// 当前盘点数目
Integer newInventory = minRecord.getNewInventory();
Double avgPrice = 0.0;
if (Integer.compare(newInventory, 0) != 0) {
// 如果新的库存不是0
// 新的均价
avgPrice = (amounts / newInventory) * 100;
}
materialById.setPrice(avgPrice);
if(producedDate != null){
// 如果盘点的是有生产日期的物料
// 获取当前库位上物料数量
Integer oldQuantity = materialById.getQuantity() - placeAndMaterialByMidAndPid.getQuantity();
// 获取当前生产日期下的物料数目
Map<String,Object> mapForProducedDate = new HashMap<>();
mapForProducedDate.put("mid",materialById.getId());
mapForProducedDate.put("producedDate",producedDate);
// 获取当前生产日期下的物料与生产日期的对应关系
MaterialAndProducedDate materialAndProducedDate = materialMapper.findMaterialAndProducedDateByMidAndProducedDate(mapForProducedDate);
Integer oldInventroy = materialAndProducedDate.getInventory();
if(newInventory > oldInventroy){
// 如果当前盘点数量大于库存数量
materialById.setQuantity(oldQuantity + newInventory);
// 修改当前库存
materialAndProducedDate.setInventory(newInventory);
// 修改使用数量
materialAndProducedDate.setExpendnum(materialAndProducedDate.getQuantity() - newInventory);
// 修改物料对应数量
materialById.setQuantity(materialById.getQuantity() + newInventory - oldInventroy);
}else{
// 如果当前盘点数量小于库存数量
// 修改当前库存
materialAndProducedDate.setInventory(newInventory);
// 修改使用数量
materialAndProducedDate.setExpendnum(materialAndProducedDate.getQuantity() - newInventory);
// 修改物料对应数量
materialById.setQuantity(materialById.getQuantity() - oldInventroy + newInventory);
}
// 定义平均价格
Double avgPrice = 0.0;
// 获取当前物料数目
Integer quantity = materialById.getQuantity();
if(quantity > 0){
// 如果当前物料数目不为零
avgPrice = amounts / quantity;
BigDecimal bg = new BigDecimal(avgPrice);
avgPrice = bg.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
}
// 更新物料单价
materialById.setPrice(avgPrice);
materialMapper.updateMaterialAndProducedDate(materialAndProducedDate);
}
else{
// 如果没有生产日期
// 获取当前库位以外的物料数量
Integer oldQuantity = materialById.getQuantity() - placeAndMaterialByMidAndPid.getQuantity();
// 获取新的物料数目
int quantity = oldQuantity + newInventory;
// 平均价格
Double avgPrice = 0.0;
if (Integer.compare(newInventory, 0) != 0) {
// 如果新的库存不是0
// 新的均价
avgPrice = (amounts / (quantity)) * 100;
BigDecimal bg = new BigDecimal(avgPrice);
avgPrice = bg.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
}
// 更新物料单价
materialById.setPrice(avgPrice);
// 更新物料数目
materialById.setQuantity(quantity);
}
// 用于计算新的库位数量
Integer newNumberForPlace = 0;
@ -742,7 +816,6 @@ public class StockTakingServiceImpl implements StockTakingService {
public Integer completeStockTakingByQyWx(TemplateCard templateCard, String userAgent) {
Map<String, Object> result = new HashMap<>();
// 获取点击的按钮
String clickKey = templateCard.getEventKey().split("_")[1];
@ -811,24 +884,121 @@ public class StockTakingServiceImpl implements StockTakingService {
// 根据盘点结果重新计算物料的单价
// 数据库中的总额
Double amounts = (materialById.getAmounts() / 100);
// 获取判断对应的生产日期
Long producedDate = minRecord.getProducedDate();
// 数据库中的总额
Double amounts = (materialById.getAmounts() / 100);
// 当前盘点数目
Integer newInventory = minRecord.getNewInventory();
Double avgPrice = 0.0;
if (Integer.compare(newInventory, 0) != 0) {
// 如果新的库存不是0
// 新的均价
avgPrice = (amounts / newInventory) * 100;
if(producedDate != null){
// 如果盘点的是有生产日期的物料
// 获取当前生产日期下的物料数目
Map<String,Object> mapForProducedDate = new HashMap<>();
mapForProducedDate.put("mid",materialById.getId());
mapForProducedDate.put("producedDate",producedDate);
// 获取当前生产日期下的物料与生产日期的对应关系
MaterialAndProducedDate materialAndProducedDate = materialMapper.findMaterialAndProducedDateByMidAndProducedDate(mapForProducedDate);
Integer oldInventroy = materialAndProducedDate.getInventory();
if(newInventory > oldInventroy){
// 如果当前盘点数量大于库存数量
// 修改当前库存
materialAndProducedDate.setInventory(newInventory);
// 修改使用数量
materialAndProducedDate.setExpendnum(materialAndProducedDate.getQuantity() - newInventory);
if(materialAndProducedDate.getQuantity() - newInventory < 0){materialAndProducedDate.setExpendnum(0);}
// 修改物料对应数量
materialById.setQuantity(materialById.getQuantity() + newInventory - oldInventroy);
}else{
// 如果当前盘点数量小于库存数量
// 修改当前库存
materialAndProducedDate.setInventory(newInventory);
// 修改使用数量
materialAndProducedDate.setExpendnum(materialAndProducedDate.getQuantity() - newInventory);
// 修改物料对应数量
materialById.setQuantity(materialById.getQuantity() - oldInventroy + newInventory);
}
// 定义平均价格
Double avgPrice = 0.0;
// 获取当前物料数目
Integer quantity = materialById.getQuantity();
if(quantity > 0){
// 如果当前物料数目不为零
avgPrice = amounts / quantity;
BigDecimal bg = new BigDecimal(avgPrice);
avgPrice = bg.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
}
// 更新物料单价
materialById.setPrice(avgPrice);
materialMapper.updateMaterialAndProducedDate(materialAndProducedDate);
}
else{
// 如果没有生产日期
// 获取当前生产日期中的物料
List<MaterialAndProducedDate> materialAndProducedDateByMid = materialMapper.findMaterialAndProducedDateByMid(materialById.getId());
if(materialAndProducedDateByMid.size() > 0){ // 如果数量大于0
MaterialAndProducedDate materialAndProducedDate = materialAndProducedDateByMid.get(materialAndProducedDateByMid.size() - 1);
// 获取当前生产日期下物料的数量
Integer oldInventroy = materialAndProducedDate.getInventory();
if(newInventory > oldInventroy){
// 如果当前盘点数量大于库存数量
// 修改当前库存
materialAndProducedDate.setInventory(newInventory);
// 修改使用数量
materialAndProducedDate.setExpendnum(materialAndProducedDate.getQuantity() - newInventory);
if(materialAndProducedDate.getQuantity() - newInventory < 0){materialAndProducedDate.setExpendnum(0);}
}
else{
// 如果当前盘点数量小于库存数量
materialById.setPrice(avgPrice);
// 修改当前库存
materialAndProducedDate.setInventory(newInventory);
// 修改使用数量
materialAndProducedDate.setExpendnum(materialAndProducedDate.getQuantity() - newInventory);
// 获取当前库位上物料数量
Integer oldQuantity = materialById.getQuantity() - placeAndMaterialByMidAndPid.getQuantity();
// 修改物料对应数量
materialById.setQuantity(materialById.getQuantity() - oldInventroy + newInventory);
}
materialMapper.updateMaterialAndProducedDate(materialAndProducedDate);
}
// 获取当前库位以外的物料数量
Integer oldQuantity = materialById.getQuantity() - placeAndMaterialByMidAndPid.getQuantity();
// 获取新的物料数目
int quantity = oldQuantity + newInventory;
// 平均价格
Double avgPrice = 0.0;
if (Integer.compare(newInventory, 0) != 0) {
// 如果新的库存不是0
// 新的均价
avgPrice = (amounts / (quantity)) * 100;
}
// 更新物料单价
materialById.setPrice(avgPrice);
// 更新物料数目
materialById.setQuantity(quantity);
}
materialById.setQuantity(oldQuantity + newInventory);
// 用于计算新的库位数量
@ -999,7 +1169,6 @@ public class StockTakingServiceImpl implements StockTakingService {
stockTakingResult = "通过";
map.put("state",1);
map.put("departmentManagerState",1);
@ -1128,28 +1297,31 @@ public class StockTakingServiceImpl implements StockTakingService {
result.put("errMsg", errMsg);
}
// 抄送盘点调账记录给盘点人员
new Thread(new Runnable() {
@Override
public void run() {
// 获取盘点人员
UserByPort originator = PageController.FindUserById(mainRecord.getOriginator(), null);
String workwechat = originator.getWorkwechat();
JSONObject jsonObject = qyWxOperationService.sendQyWxToStockTakingMessage("PangFuZhen,", ObjectFormatUtil.toInteger(mainId),normalMinId,userAgent);
if(normalMinId.size() > 0) {
new Thread(new Runnable() {
@Override
public void run() {
// 获取盘点人员
UserByPort originator = PageController.FindUserById(mainRecord.getOriginator(), null);
String workwechat = originator.getWorkwechat();
JSONObject jsonObject = qyWxOperationService.sendQyWxToStockTakingMessage("PangFuZhen,", ObjectFormatUtil.toInteger(mainId), normalMinId, userAgent);
// JSONObject jsonObject = qyWxOperationService.sendQyWxToStockTakingMessage(workwechat, mainId,normalMinId);
// 将当前返回结果保存到redis中
if(jsonObject!=null) {
Map<String, Object> QyWxMessageMap = new HashMap<>();
QyWxMessageMap.put("MsgId", jsonObject.getString("msgid"));
QyWxMessageMap.put("responseCode", jsonObject.getString("response_code"));
// key user:300450:QyWxOut:1
redisTemplate.opsForHash().putAll("user:" + approver_user.getNumber() + ":QyWxStockTakingCompleteId:" + mainId, QyWxMessageMap);
// 设置过期时间为三天
redisTemplate.expire("user:" + approver_user.getNumber() + ":QyWxStockTakingCompleteId:" + mainId, 72, TimeUnit.HOURS);
// 将当前返回结果保存到redis中
if (jsonObject != null) {
Map<String, Object> QyWxMessageMap = new HashMap<>();
QyWxMessageMap.put("MsgId", jsonObject.getString("msgid"));
QyWxMessageMap.put("responseCode", jsonObject.getString("response_code"));
// key user:300450:QyWxOut:1
redisTemplate.opsForHash().putAll("user:" + approver_user.getNumber() + ":QyWxStockTakingCompleteId:" + mainId, QyWxMessageMap);
// 设置过期时间为三天
redisTemplate.expire("user:" + approver_user.getNumber() + ":QyWxStockTakingCompleteId:" + mainId, 72, TimeUnit.HOURS);
}
}
}
}).start();
}).start();
}
}
else {
@ -1487,6 +1659,8 @@ public class StockTakingServiceImpl implements StockTakingService {
// 新的均价
avgPrice = (amounts / newInventory) * 100;
BigDecimal bg = new BigDecimal(avgPrice);
avgPrice = bg.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
}

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

@ -15,6 +15,8 @@ import java.util.Date;
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 = Long.valueOf(86400000); // 一天的时长
public static final Long warningTime = Long.valueOf(86400000 * 7); // 预定报警时间:7天
/**
* 获取时间的字符串精确到s
* @param date 时间

6
src/main/resources/application-test.yml

@ -79,9 +79,9 @@ mybatis:
log-impl: org.apache.ibatis.logging.slf4j.Slf4jImpl
log-prefix: mapper.
#mybatis-plus:
# configuration:
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
mybatis-plus:
configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
file:
uploadPath: D:/upLoad

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

@ -33,6 +33,9 @@
width: 100%;
border-style: none;
}
.lay-step{
display: none;
}
</style>
@ -75,8 +78,9 @@
onblur="selectCode(this)"
class="layui-input" lay-verify="required"
style="border-style: none">
<img src="/static/images/search.ico" height="16" width="16"
<img src="/static/images/search.ico" height="16" width="16" id="qrCodeImg"
style="margin-top: 10px" onclick="scanCodeInStorage(this)">
<input id="qrCode" name="qrCode" type="text" style="display:none;">
</div>
</div>
</div>
@ -94,6 +98,13 @@
</div>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">生产日期:</label>
<div class="layui-input-block">
<input type="text" name="producedDate" id="producedDate" placeholder="请填写生产日期" onclick="selectDate(this)"
autocomplete="off" class="layui-input" lay-verify="required">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">物料单价:</label>
<div class="layui-input-block">
@ -214,14 +225,21 @@
}
// 用于选择生产日期
function selectDate() {
}
// 用于暂存卡片个数
var params = [];
let scanValue = {};
// 用于卡片编号
var NewIdNumber = 1;
layui.use(['form', 'step', 'flow'], function () {
layui.use(['form', 'step', 'flow','laydate'], function () {
var $ = layui.$,
form = layui.form,
laydate = layui.laydate,
step = layui.step;
// 用于分步表单加载
@ -229,7 +247,7 @@
elem: '#stepForm',
filter: 'stepForm',
width: '100%', //设置容器宽度
height: '700px',
height: '730px',
stepItems: [{
title: '填写信息'
}, {
@ -238,6 +256,8 @@
});
// 用于提交操作
form.on('submit(formStep)', function (data) {
data = data.field;
@ -337,7 +357,8 @@
<div class="inputdiv">
<input id="code" name=` + "code" + NewIdNumber + ` type="text" placeholder="请填写入物料编码" value="" onblur="selectCode(this)"
class="layui-input" lay-verify="required" style="border-style: none">
<img src="/static/images/search.ico" height="16" width="16" style="margin-top: 10px" onclick="scanCodeInStorage(this)" >
<img id=`+"qrCodeImg"+NewIdNumber+` src="/static/images/search.ico" height="16" width="16" style="margin-top: 10px" onclick="scanCodeInStorage(this)" >
<input id=`+"qrCode"+NewIdNumber +` name=`+"qrCode"+NewIdNumber+` type="text" style="display:none;">
</div>
</div>
</div>
@ -353,6 +374,13 @@
</div>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">生产日期:</label>
<div class="layui-input-block">
<input type="text" name=`+"producedDate"+NewIdNumber +` id=`+"producedDate"+NewIdNumber+` placeholder="请填写生产日期"
onclick="selectDate(this)" autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">物料单价:</label>
<div class="layui-input-block">
@ -396,7 +424,7 @@
// 获取当前高度
var height = parseInt(($("#stepForm").css('height')).split("px")[0]);
params.push(NewIdNumber);
$("#stepForm").css("height", height + 532 + 'px');
$("#stepForm").css("height", height + 587 + 'px');
$("#" + parentId).after(materialItem);
};
@ -409,7 +437,7 @@
// 获取祖父节点
var reparent = parent.parentNode;
var height = parseInt(($("#stepForm").css('height')).split("px")[0]);
$("#stepForm").css("height", height - 532 + 'px');
$("#stepForm").css("height", height - 587 + 'px');
params = remove(params, parentId);
reparent.removeChild(parent);
};
@ -427,6 +455,17 @@
return result;
}
// 用于选择生产日期
selectDate = function(obj) {
var name = obj.id;
laydate.render({
elem: '#'+name
, format: 'yyyy-MM-dd'
, show: true
});
};
// 用于实现通过编码查询物料
selectCode = function (obj) {
@ -435,7 +474,7 @@
// 获取对应元素
var parent = obj.parentNode.parentNode.parentNode.parentNode;
var materialChildren = parent.childNodes[5];
var priceChildren = parent.childNodes[11];
var priceChildren = parent.childNodes[13];
var barCodeChildren = parent.childNodes[9];
// 物料条目
var materialItem = materialChildren.childNodes[3].childNodes[1].childNodes;
@ -492,7 +531,7 @@
form.render();
$.each(materialAndBarCodeList, function (index, item) {
$("#barCode" + idNumber).append(new Option(item.bmcode, item.id));//往下拉菜单里添加元素
$("#barCode" + idNumber).append(new Option(item.bmcode, item.bmcode));//往下拉菜单里添加元素
});
form.render();
}else{
@ -504,13 +543,14 @@
}
}
});
};
// 用于实现点击搜索按钮
selectMaterial = function (obj) {
var parent = obj.parentNode.parentNode.parentNode.parentNode;
var parentId = parent.id;
var codeChildren = parent.childNodes[7];
var priceChildren = parent.childNodes[11];
var priceChildren = parent.childNodes[13];
var materialChildren = parent.childNodes[5];
// 条形码
var barCodeChildren = parent.childNodes[9];
@ -623,6 +663,7 @@
};
// 用于扫码入库
scanCodeInStorage = function (obj) {
var objIdNumber = obj.id.split("qrCodeImg")[1];
parent.wx.scanQRCode({
desc: 'scanQRCode desc',
needResult: 1, // 默认为0,扫描结果由企业微信处理,1则直接返回扫描结果,
@ -632,6 +673,7 @@
var result = res.resultStr;//当needResult为1时返回处理结果
var req = {};
req.qrCode = result;
$("#qrCode"+objIdNumber).val(result);
$.ajax({
url: "/material/qywxApplicationInScanQrCode",
type: "post",
@ -643,7 +685,7 @@
var parent = obj.parentNode.parentNode.parentNode.parentNode;
var codeChildren = parent.childNodes[7];
var priceChildren = parent.childNodes[11];
var priceChildren = parent.childNodes[13];
var materialChildren = parent.childNodes[5];
// 条形码
var barCodeChildren = parent.childNodes[9];
@ -718,7 +760,7 @@
var material = data["material"];
var parent = obj.parentNode.parentNode.parentNode.parentNode;
var codeChildren = parent.childNodes[7];
var priceChildren = parent.childNodes[11];
var priceChildren = parent.childNodes[13];
var materialChildren = parent.childNodes[5];
// 条形码
var barCodeChildren = parent.childNodes[9];

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

@ -23,7 +23,9 @@
.layui-input-block{
margin-left: 80px;
}
.lay-step{
display: none;
}
</style>
<div class="layuimini-container">
@ -58,6 +60,13 @@
class="layui-input" lay-verify="required">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">生产日期:</label>
<div class="layui-input-block">
<input type="text" name="producedDate" id="producedDate" placeholder="请填写生产日期" onclick="selectDate(this)"
autocomplete="off" class="layui-input" lay-verify="required">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">物料单价:</label>
<div class="layui-input-block">
@ -127,14 +136,19 @@
<script src="/static/lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
<script src="/static/js/lay-config.js?v=1.0.4" charset="utf-8"></script>
<script>
layui.use(['form', 'step'], function () {
layui.use(['form', 'step','laydate'], function () {
var $ = layui.$,
form = layui.form,
laydate = layui.laydate,
step = layui.step;
var mid = $("#mid").val();
var depositoryId = $("#depositoryId").val();
laydate.render({
elem: '#producedDate'
, format: 'yyyy-MM-dd'
});
$("#code").blur(function () {
var code = $(this).val();

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

@ -31,6 +31,9 @@
.layui-form-select{
width: 100%;
}
.lay-step{
display: none;
}
</style>
@ -159,7 +162,7 @@
num = "";
}
$.each(materialAndBarCodeList, function (index, item) {
$("#barCode"+num).append(new Option(item.bmcode, item.id));//往下拉菜单里添加元素
$("#barCode"+num).append(new Option(item.bmcode, item.bmcode));//往下拉菜单里添加元素
});
form.render()
}

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

@ -37,7 +37,9 @@
.layui-card-body {
padding: 10px 5px;
}
.lay-step{
display: none;
}
</style>
<div class="layuimini-container">
<div class="layuimini-main">
@ -307,12 +309,19 @@
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">物料编码:</label>
<div class="layui-input-block">
<input id=` + "code" + NewIdNumber + ` name=` + "code" + NewIdNumber + ` type="text" placeholder="请填写入物料编码" value="" onblur="selectCode(this)"
class="layui-input" lay-verify="required">
</div>
</div>
<label class="layui-form-label">物料编码:</label>
<div class="layui-input-block">
<div class="inputdiv">
<input id=`+"code"+NewIdNumber+` name=`+"code"+NewIdNumber+` type="text" placeholder="请填写入物料编码" value=""
onblur="selectCode(this)"
class="layui-input" lay-verify="required"
style="border-style: none">
<img src="/static/images/search.ico" height="16" width="16"
style="margin-top: 10px" onclick="scanCodeByOut(this)">
</div>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">条形编码:</label>
<div class="layui-input-block" style="margin: 0px;">
@ -657,7 +666,6 @@
data: JSON.stringify(req),
contentType: "application/json;charset=utf-8",
success: function (d) {
// 获取对应元素
var parent = obj.parentNode.parentNode.parentNode.parentNode;
@ -674,19 +682,15 @@
var materialCodeItem = parent.childNodes[7].childNodes[3].childNodes[1].childNodes;
var materialCode = materialCodeItem.childNodes[1];
var materialCode = materialCodeItem[1];
var data = d.data;
if (data !== null) {
materialName.value = data.mname;
materialId.value = data.mid;
materialCode.value = data.mcode;
var barCodeInput = barCodeItem.childNodes[1].childNodes[1];
barCodeInput.value = result;
}
}
@ -698,6 +702,7 @@
// 用于扫码功能
scanCodeByOut = function (obj) {
parent.wx.scanQRCode({
desc: 'scanQRCode desc',
needResult: 1, // 默认为0,扫描结果由企业微信处理,1则直接返回扫描结果,

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

@ -22,7 +22,9 @@
.layui-input-block{
margin-left: 80px;
}
.lay-step{
display: none;
}
</style>
<div class="layuimini-container">
<div class="layuimini-main">

2
src/main/resources/templates/pages/application/application-out_min-mobile.html

@ -70,6 +70,7 @@
'<h4> 物料名称:' + data[i].mname + '</h4>' +
'<h4> 物料编码:' + data[i].mcode + '</h4>' +
'<h4> 出库数量:' + data[i].quantity + '</h4>' +
'<h4> 生产日期:' + data[i].producedDate + '</h4>' +
'<div>备注:<h4> ' + data[i].applyRemark + '</h4></div>' +
'</div>');
// 底部信息
@ -89,6 +90,7 @@
'<h4> 物料编码:' + data[i].mcode + '</h4>' +
'<h4> 出库数量:' + data[i].quantity + '</h4>' +
'<h4> 处理人:' + data[i].checkerName + '</h4>' +
'<h4> 生产日期:' + data[i].producedDate + '</h4>' +
'<div>备注:<h4> ' + data[i].applyRemark + '</h4></div>' +
'</div>');
// 底部信息

1
src/main/resources/templates/pages/application/application-out_min.html

@ -72,6 +72,7 @@
{field: 'code', width: 200, title: '提交编码', sort: true},
{field: 'mname', width: 120, title: '物料名称'},
{field: 'mcode', width: 120, title: '物料编码'},
{field: 'producedDate', width: 120, title: '生产日期'},
{field: 'depositoryName', width: 120, title: '仓库名称'},
{field: 'pcode', width: 120, title: '库位编码'},
{field: 'quantity', width: 80, title: '数量', sort: true},

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

@ -22,7 +22,9 @@
.layui-input-block{
margin-left: 80px;
}
.lay-step{
display: none;
}
</style>
<div class="layuimini-container">
<div class="layuimini-main">

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

@ -29,6 +29,9 @@
.layui-card-body{
padding: 10px 5px;
}
.lay-step{
display: none;
}
</style>
<div class="layuimini-container">
<div class="layuimini-main">

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

@ -23,7 +23,9 @@
.layui-input-block{
margin-left: 80px;
}
.lay-step{
display: none;
}
</style>
<div class="layuimini-container">
<div class="layuimini-main">

2
src/main/resources/templates/pages/application/application_multi.html

@ -70,7 +70,7 @@
{field: 'depositoryName', width: '12%', title: '仓库名称'},
{field: 'placeCode', width: '12%', title: '库位编码'},
{field: 'quantity', width: '10%', title: '数量',edit:'quantity'},
{field: 'price', width: '10%', title: '单价'},
{field: 'price', width: '10%', title: '单价',edit:'price'},
{field: 'depositoryId', width: '10%', title: '仓库编号',edit:'quantity'},
{field: 'applyRemark', width: '10%', title: '备注说明',edit:'applyRemark'},
{title: '操作', minWidth: 250, toolbar: '#currentTableBar', align: "center"}

159
src/main/resources/templates/pages/depository/table-stock.html

@ -20,12 +20,14 @@
<div class="layui-inline">
<label class="layui-form-label">仓库</label>
<div class="layui-input-inline">
<!-- <select name="depositoryId" >
<option value="" selected>请选择仓库</option>
<option th:each="depository,iterStar:${depositories}" th:value="${depository?.getId()}" th:text="${depository?.getDname()}" >外芯仓库</option>
</select>-->
<input type="text" placeholder="请选择仓库" class="layui-input" id="openSonByDepository" readonly />
<input type="text" name="depositoryId" class="layui-input" id="depositoryId" style="display: none" />
<!-- <select name="depositoryId" >
<option value="" selected>请选择仓库</option>
<option th:each="depository,iterStar:${depositories}" th:value="${depository?.getId()}" th:text="${depository?.getDname()}" >外芯仓库</option>
</select>-->
<input type="text" placeholder="请选择仓库" class="layui-input" id="openSonByDepository"
readonly/>
<input type="text" name="depositoryId" class="layui-input" id="depositoryId"
style="display: none"/>
</div>
</div>
<div class="layui-inline">
@ -55,36 +57,38 @@
<div class="layui-btn-container">
<button class="layui-btn layui-btn-normal layui-btn-sm data-add-btn" lay-event="add">添加</button>
<button class="layui-btn layui-btn-normal layui-btn-sm data-add-btn" lay-event="dispose">处理</button>
<button class="layui-btn layui-btn-normal layui-btn-sm data-add-btn" id="u_fileUpload" lay-event="import">导入数据</button>
<button class="layui-btn layui-btn-normal layui-btn-sm data-add-btn" id="u_fileUpload"
lay-event="import">导入数据
</button>
</div>
</script>
<table class="layui-hide" id="currentTableId" lay-filter="currentTableFilter"></table>
<script id="currentTableBar" type="text/html">
<a class="layui-btn layui-btn-normal layui-btn-xs data-count-subclass" lay-event="applicationIn">入库申请</a>
<a class="layui-btn layui-btn-xs data-count-edit" lay-event="applicationOut" >出库申请</a>
<a class="layui-btn layui-btn-xs data-count-edit" lay-event="applicationOut">出库申请</a>
</script>
</div>
</div>
<script src="/static/lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
<script>
var data;
layui.use(['form', 'table','upload'], function () {
layui.use(['form', 'table', 'upload'], function () {
var $ = layui.jquery,
form = layui.form,
upload = layui.upload,
table = layui.table;
$('#openSonByDepository').on('click', function(){
$('#openSonByDepository').on('click', function () {
layer.open({
type: 2,
title: '弹窗内容',
skin: 'layui-layer-rim',
maxmin: true,
shadeClose: true, //点击遮罩关闭层
area : ['70%' , '70%'],
move : '.layui-layer-title',
fixed:false,
area: ['70%', '70%'],
move: '.layui-layer-title',
fixed: false,
content: '/selectDepository?type=2',
});
});
@ -106,39 +110,68 @@
},
response: {
statusName: 'status' //规定数据状态的字段名称,默认:code
,statusCode: 200 //规定成功的状态码,默认:0
,msgName: 'message' //规定状态信息的字段名称,默认:msg
,countName: 'count' //规定数据总数的字段名称,默认:count
,dataName: 'data' //规定数据列表的字段名称,默认:data
, statusCode: 200 //规定成功的状态码,默认:0
, msgName: 'message' //规定状态信息的字段名称,默认:msg
, countName: 'count' //规定数据总数的字段名称,默认:count
, dataName: 'data' //规定数据列表的字段名称,默认:data
},
toolbar: '#toolbarDemo',
cols: [
[
{type: "checkbox", width: 50},
{field: 'id', width: '10%', title: '物料编号'},
{field: 'mname', width: '10%', title: '物料名称'},
{field: 'version',width: 200,title: '规格型号'},
{field: 'code',width: 200,title: '存货编码',sort: true},
{field: 'typeName', width: '10%', title: '物料类型'},
{field: 'depositoryName', width: '12%', title: '仓库名称'},
{field: 'depositoryCode', width: '12%', title: '仓库编码'},
{field: 'placeCode', width: '12%', title: '库位编码'},
{field: 'quantity', width: '10%', title: '数量', sort: true},
{field: 'price', title: '单价', width: '8%', sort: true},
{field: 'amounts', title: '总金额', minWidth: 150, sort: true},
{field: 'unit',width: '10%',title: '计量单位'},
{field: 'texture',width: '8%',title: '材质',},
{title: '操作', minWidth: 250, toolbar: '#currentTableBar', align: "center"}
]
{type: "checkbox", width: 50},
{field: 'id', width: '10%', title: '物料编号'},
{field: 'mname', width: '10%', title: '物料名称'},
{field: 'version', width: 200, title: '规格型号'},
{field: 'code', width: 200, title: '存货编码'},
{field: 'typeName', width: '10%', title: '物料类型'},
{field: 'depositoryName', width: '12%', title: '仓库名称'},
{field: 'depositoryCode', width: '12%', title: '仓库编码'},
{field: 'placeCode', width: '12%', title: '库位编码'},
{field: 'quantity', width: '10%', title: '数量', sort: true},
{field: 'warningCount', width: '12%', title: '待过期数量', sort: true},
{field: 'price', title: '单价', width: '8%', sort: true},
{field: 'amounts', title: '总金额', minWidth: 150, sort: true},
{field: 'unit', width: '10%', title: '计量单位'},
{field: 'texture', width: '8%', title: '材质',},
{title: '操作', minWidth: 250, toolbar: '#currentTableBar', align: "center"}
]
],
limits: [10, 15, 20, 25, 50],
limit: 10,
page: true,
skin: 'line',
done:function () {
$("[data-field='id']").css('display','none');
done: function (res, curr, count) {
$("[data-field='id']").css('display', 'none');
$("[data-field='shelfLifeForCalc']").css('display', 'none');
$.each(res['data'], function (i, j) {
let jElement = j['warningCount'];
if (jElement !== null && jElement !== undefined) {
let flag = (Number(jElement) !== 0);
if (flag) {
// console.log(i + ' -458- ' + 'jdjg is null');
Layui_SetDataTableRowColor('table', i + 1, '#b1070a');
}
}
});
}
});
// 用于给table行上色的方法
function Layui_SetDataTableRowColor(TabDivId, RowIndex, ColorString) {
try {
var div = $("[lay-id='currentTableId'] tr:eq(" + RowIndex + ")");
if (div != null) //找到对象了
{
// console.log(div);
div.css("color", ColorString);
} else {
console.log('没有找到对象');
}
} catch (e) {
console.log(e.message);
}
}
//监听表格复选框选择
table.on('checkbox(currentTableFilter)', function (obj) {
@ -147,16 +180,16 @@
// 监听搜索操作
form.on('submit(data-search-btn)', function (data) {
var req={};
data=data.field;
if (data.mname!==''){
req.mname=data.mname;
var req = {};
data = data.field;
if (data.mname !== '') {
req.mname = data.mname;
}
if (data.depositoryId!==''){
req.depositoryId=data.depositoryId;
if (data.depositoryId !== '') {
req.depositoryId = data.depositoryId;
}
if(data.code !==''){
req.code =data.code;
if (data.code !== '') {
req.code = data.code;
}
//执行搜索重载
table.reload('currentTableId', {
@ -185,7 +218,7 @@
req.depositoryIds[i] = data[i].depositoryId;
req.placeCodes[i] = data[i].placeCode;
}
if(req.mids.length > 0) {
if (req.mids.length > 0) {
$.ajax({
url: "/depositoryRecord/addApplicationToRedis",
type: "post",
@ -222,13 +255,11 @@
}
}
})
}
else{
} else {
layer.msg("未选中记录,请确认!");
return false;
}
}
else if(obj.event==='dispose'){
} else if (obj.event === 'dispose') {
var index = layer.open({
title: '入库申请',
type: 2,
@ -256,13 +287,13 @@
maxmin: true,
shadeClose: true,
area: ['100%', '100%'],
content: '/application_in_back?mid='+data.id+"&depositoryId="+data.depositoryId
content: '/application_in_back?mid=' + data.id + "&depositoryId=" + data.depositoryId
});
$(window).on("resize", function () {
layer.full(index);
});
return false;
}else if(obj.event === 'applicationOut'){
} else if (obj.event === 'applicationOut') {
// 出库申请
var index = layer.open({
title: '出库申请',
@ -271,7 +302,7 @@
maxmin: true,
shadeClose: true,
area: ['100%', '100%'],
content: '/application_out_back?code='+data.code+"&depositoryId="+data.depositoryId
content: '/application_out_back?code=' + data.code + "&depositoryId=" + data.depositoryId
});
$(window).on("resize", function () {
layer.full(index);
@ -283,21 +314,21 @@
});
//用于导入数据
var upLoader = upload.render({
elem:"#u_fileUpload", // 绑定元素
url:'/excel/importInventory', // 上传接口
accept:'file', // 允许上传的格式,
before: function(obj) { //obj参数包含的信息,跟 choose回调完全一致,可参见上文。
var upLoader = upload.render({
elem: "#u_fileUpload", // 绑定元素
url: '/excel/importInventory', // 上传接口
accept: 'file', // 允许上传的格式,
before: function (obj) { //obj参数包含的信息,跟 choose回调完全一致,可参见上文。
layer.load(); //上传loading
},
exts:'xls|xlsx|csv',
done:function(res){
exts: 'xls|xlsx|csv',
done: function (res) {
layer.closeAll('loading'); //关闭loading
//如果上传成功
if(res.code == 200){
if (res.code == 200) {
var re = "";
for (let i = 0; i < res.data.errMsg.length; i++) {
var show = "<p style='color: #ff211e'>"+res.data.errMsg[i] + ":错误"+"</p>"
var show = "<p style='color: #ff211e'>" + res.data.errMsg[i] + ":错误" + "</p>";
re += show
}
for (let i = 0; i < res.data.dataList.length; i++) {
@ -305,7 +336,7 @@
var code = res.data.dataList[i]["code"];
var price = res.data.dataList[i]["price"];
var quantity = res.data.dataList[i]["quantity"];
var show = "<p style='color: #00FF00'>"+mname +" " +code+" "+price +" "+quantity +":成功" +"</p>"
var show = "<p style='color: #00FF00'>" + mname + " " + code + " " + price + " " + quantity + ":成功" + "</p>";
re += show
}
@ -315,16 +346,16 @@
area: ['500px', '500px'], //宽高
content: re
})
}else{
} else {
layer.msg(res.msg)
}
},
error:function (){
error: function () {
layer.closeAll('loading'); //关闭loading
var demoText = $('#demoText');
demoText.html('<span style="color: #FF5722;">上传失败</span> <a class="layui-btn layui-btn-xs demo-reload">重试</a>');
demoText.find('.demo-reload').on('click', function(){
demoText.find('.demo-reload').on('click', function () {
upLoader.upload()
})
}

45
src/main/resources/templates/pages/material/material-add.html

@ -11,8 +11,12 @@
</head>
<body>
<style>
.inputdiv{
display:flex;background-color: #fff;height: 38px;line-height: 38px;border: 1px solid rgb(238, 238, 238);
.inputdiv {
display: flex;
background-color: #fff;
height: 38px;
line-height: 38px;
border: 1px solid rgb(238, 238, 238);
}
.layui-form-label{
@ -27,6 +31,9 @@
padding-left: 0px;
padding-right: 0px;
}
.inputdiv .layui-unselect{
border-style: none;
}
</style>
<div class="layuimini-container">
<div class="layuimini-main">
@ -95,18 +102,25 @@
name="unit" />
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">生产日期:</label>
<div class="layui-input-block">
<input type="text" name="producedDate" id="producedDate" placeholder="请选择生产日期"
autocomplete="off" class="layui-input">
</div>
</div>
<!-- <div class="layui-form-item">-->
<!-- <label class="layui-form-label">保质期:</label>-->
<!-- <div class="layui-input-block">-->
<!-- <input type="text" name="shelfLife" id="shelfLife" placeholder="请选择保质日期"-->
<!-- autocomplete="off" class="layui-input">-->
<!-- </div>-->
<!-- </div>-->
<div class="layui-form-item">
<label class="layui-form-label">保质期:</label>
<div class="layui-input-block">
<input type="text" name="shelfLife" id="shelfLife" placeholder="请选择保质日期"
autocomplete="off" class="layui-input">
<div class="inputdiv">
<input type="number" name="shelfLife" id="shelfLife" placeholder="请填写保质日期" autocomplete="off"
class="layui-input" style="border-style: none">
<select id="dateType" name="dateType">
<option value="year"></option>
<option value="month" selected></option>
<option value="day"></option>
</select>
</div>
</div>
</div>
<div class="layui-form-item">
@ -170,15 +184,6 @@
});
});
laydate.render({
elem: '#producedDate'
,format: 'yyyy-MM-dd'
});
laydate.render({
elem: '#shelfLife'
,format: 'yyyy-MM-dd'
});
$('#openSonByDepository').on('click', function(){
layer.open({

15
src/main/resources/templates/pages/material/material-out.html

@ -167,11 +167,9 @@
{field: 'texture', width: 100, title: '材质'},
{field: 'unit', width: 150, title: '计量单位'},
{field: 'brand', width: 150, title: '品牌'},
{field: 'producedDate', width: 150, title: '生产日期'},
{field: 'shelfLife', width: 150, title: '保质期'},
{field: 'productionPlace', width: 150, title: '产地'},
{field: 'remark', width: 150, title: '备注'},
{field: 'shelfLifeForCalc', width: 150, title: '用于计算时间'},
{field: 'state', title: '状态', minWidth: 80, templet: '#switchTpl'},
{title: '操作', minWidth: 200, toolbar: '#currentTableBar', align: "center"}
]
@ -180,20 +178,9 @@
limit: 10,
page: true,
skin: 'line',
done: function (res, curr, count) {
done: function () {
$("[data-field='id']").css('display', 'none');
$("[data-field='shelfLifeForCalc']").css('display', 'none');
$.each(res['data'], function (i, j) {
let jElement = j['shelfLifeForCalc'];
if (jElement !== null && jElement !== undefined) {
let flag = (Number(jElement) - Number(nowDay) < warningTime);
if (flag) {
// console.log(i + ' -458- ' + 'jdjg is null');
Layui_SetDataTableRowColor('table', i + 1, '#b1070a');
}
}
});
}
});

32
src/main/resources/templates/pages/material/material-view.html

@ -28,6 +28,9 @@
margin-left: 80px;
}
.inputdiv .layui-unselect{
border-style: none;
}
</style>
</head>
@ -96,19 +99,18 @@
class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">生产日期:</label>
<div class="layui-input-inline">
<input type="text" name="producedDate" id="producedDate" placeholder="请选择生产日期" th:value="${record.getShowProducedDate()}"
autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">保质期:</label>
<div class="layui-input-inline">
<input type="text" name="shelfLife" id="shelfLife" placeholder="请选择保质日期" th:value="${record.getShowShelfLife()}"
autocomplete="off" class="layui-input">
<div class="inputdiv">
<input type="number" name="shelfLife" id="shelfLife" placeholder="请填写保质日期" autocomplete="off" lay-verify="required" th:value="${record.getShelfLife()}"
class="layui-input" style="border-style: none">
<select id="dateType" name="dateType">
<option value="year" th:selected="${record.getShowShelfLife() == 'year'}"></option>
<option value="month" th:selected="${record.getShowShelfLife() == 'month'}"></option>
<option value="day" th:selected="${record.getShowShelfLife() == 'day'}"></option>
</select>
</div>
</div>
</div>
@ -208,17 +210,7 @@
});
return false;
});
laydate.render({
elem: '#producedDate'
,value: $("#producedDate").val()
,format: 'yyyy-MM-dd'
});
laydate.render({
elem: '#shelfLife'
,value: $("#shelfLife").val()
,format: 'yyyy-MM-dd'
});
checkBarCode = function () {
var mid = $("#mid").val();

5
src/main/resources/templates/pages/material/selectDepository.html

@ -64,12 +64,15 @@
type: 'get',
dataType: 'json',
contentType: "application/json;charset=utf-8",
beforeSend: function () {
},
success: function (d) {
var data2 = d.data;
test.reload({
data:data2
});
}
},
});
})
</script>

4
src/main/resources/templates/pages/material/selectDepositoryByCard.html

@ -40,8 +40,8 @@
}
var windowParent = $("#" + clickObj, window.parent.document)[0];
var depositoryChildren = null;
if (windowParent.childNodes.length === 17) {
depositoryChildren = windowParent.childNodes[15];
if (windowParent.childNodes.length === 23) {
depositoryChildren = windowParent.childNodes[17];
} else {
depositoryChildren = windowParent.childNodes[15];
}

17
src/main/resources/templates/pages/scanQrCode/ScanBarOrQrCodeOut.html

@ -43,6 +43,8 @@
var depository = null;
var place = null;
var material = null;
var qrCode = null;
var barCode = null;
layui.$(function () {
parent.parent.parent.wx.scanQRCode({
@ -200,6 +202,8 @@
var param = {};
param.id = id;
param.placeId = place.id;
param.qrCode = qrCode;
param.barCode = barCode;
// 弹出确定框
isOutTrue(param);
}
@ -232,11 +236,19 @@
var param = {};
param.id = id;
param.placeId = place.id;
param.qrCode = qrCode;
param.barCode = barCode;
// 弹出确定框
isOutTrue(param);
}
}
else {
var codeType = data.CodeType;
if(codeType === 1){
qrCode = req.qrCode;
}else{
barCode = req.qrCode;
};
layer.confirm("请扫描仓库或库位", {
btn: ["扫描", "取消"]
}, function () { // 继续
@ -317,6 +329,8 @@
var param = {};
param.id = id;
param.placeId = place.id;
param.qrCode = qrCode;
param.barCode = barCode;
// 弹出确定框
isOutTrue(param);
}
@ -371,8 +385,11 @@
// 如果正确
var param = {};
param.id = id;
param.qrCode = qrCode;
param.barCode = barCode;
// 弹出确定框
isOutTrue(param);
}
}
}

319
src/main/resources/templates/pages/stockTaking/stockTaking.html

@ -31,7 +31,9 @@
width: 100%;
border-style: none;
}
.lay-step{
display: none;
}
</style>
</head>
<body>
@ -168,10 +170,20 @@
name="unit"/>
</div>
</div>
<div class="layui-form-item" style="display: none" id="producedDateItem">
<label class="layui-form-label">生产日期:</label>
<div class="layui-input-block">
<!-- <input type="text" name="producedDate" id="producedDate" placeholder="请填写生产日期" onclick="selectDate(this)"-->
<!-- autocomplete="off" class="layui-input">-->
<select name="producedDate" id="producedDate">
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">库存数量:</label>
<div class="layui-input-block">
<input type="number" class="layui-input" readonly
<input type="number" class="layui-input" readonly id="oldInventory"
name="oldInventory" lay-verify="required"/>
</div>
</div>
@ -305,9 +317,10 @@
let barCodeList = {};
let needToUpdate = {};
layui.use(['form', 'step', 'flow'], function () {
layui.use(['form', 'step', 'flow','laydate'], function () {
var $ = layui.$,
form = layui.form,
laydate = layui.laydate,
step = layui.step;
departmentManagerId = $("#departmentManagerId").val();
@ -316,14 +329,22 @@
elem: '#stepForm',
filter: 'stepForm',
width: '100%', //设置容器宽度
height: '1300px',
height: '1350px',
stepItems: [{
title: '填写信息'
}, {
title: '提交成功'
}]
});
// 用于选择生产日期
/* selectDate = function(obj) {
var name = obj.id;
laydate.render({
elem: '#'+name
, format: 'yyyy-MM-dd'
, show: true
});
};*/
// 用于打开仓库树形菜单
$('#openSonByDepository').on('click', function () {
@ -498,11 +519,19 @@
<input name=` + "unit" + NewIdNumber + ` type="text" placeholder="请填写计量单位" class="layui-input" />
</div>
</div>
<div class="layui-form-item" style="display: none" id=` + "producedDateItem" + NewIdNumber + `>
<label class="layui-form-label">生产日期:</label>
<div class="layui-input-block">
<select name=` + "producedDate" + NewIdNumber + ` id=` + "producedDate" + NewIdNumber + ` >
</select>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">库存数量:</label>
<div class="layui-input-block">
<input type="number" class="layui-input" readonly
name=` + "oldInventory" + NewIdNumber + ` lay-verify="required"/>
name=` + "oldInventory" + NewIdNumber + ` id=`+"oldInventory"+NewIdNumber+` lay-verify="required"/>
</div>
</div>
<div class="layui-form-item">
@ -535,7 +564,7 @@
var height = parseInt(($("#stepForm").css('height')).split("px")[0]);
params.push(NewIdNumber);
// $("#form1").css("height", height + 682 + 'px');
$("#stepForm").css("height", height + 682 + 'px');
$("#stepForm").css("height", height + 735 + 'px');
$("#" + parentId).after(materialItem);
};
@ -548,7 +577,7 @@
// 获取祖父节点
var reparent = parent.parentNode;
var height = parseInt(($("#stepForm").css('height')).split("px")[0]);
$("#stepForm").css("height", height - 682 + 'px');
$("#stepForm").css("height", height - 735 + 'px');
params = remove(params, parentId);
reparent.removeChild(parent);
};
@ -586,10 +615,10 @@
success: function (d) {
var data = d.data;
var flag = data["flag"];
if(flag === 0){
if (flag === 0) {
// 如果没有获取到位置
layer.msg("当前二维码错误,请重新扫描");
}else if(flag === 1){
} else if (flag === 1) {
// 如果获取到的是库位
var place = data["place"];
$("#placeId").val(place.id);
@ -598,7 +627,7 @@
depositoryId = place.did;
placeId = place.id;
}else if(flag === 2){
} else if (flag === 2) {
// 如果获取到的是仓库
var depository = data["depository"];
$("#placeId").val("0");
@ -634,7 +663,7 @@
// 计量单位父级
var unitChildren = parent.childNodes[17];
// 库存数量父级
var inventoryChildren = parent.childNodes[19];
var inventoryChildren = parent.childNodes[21];
// 条形码父级
var barCodeChildren = parent.childNodes[9];
@ -701,6 +730,13 @@
});
form.render();
}
var shelfLife = material.shelfLife;
if (shelfLife !== null && shelfLife !== undefined) {
$("#" + "producedDateItem" + idNumber).show();
$("#" + "producedDate" + idNumber).attr("lay-verify", "required");
}
}
});
}
@ -734,7 +770,7 @@
// 计量单位父级
var unitChildren = parent.childNodes[17];
// 库存数量父级
var inventoryChildren = parent.childNodes[19];
var inventoryChildren = parent.childNodes[21];
// 条形码父级
var barCodeChildren = parent.childNodes[9];
@ -789,17 +825,38 @@
inventoryChildren.childNodes[3].childNodes[1].value = d.quantity;
// 获取物料与条形码的对应关系
var materialAndBarCodeList = d["materialAndBarCodeList"];
var idNumber = materialId.name.split("mid")[1];
var barCode = $("#barCode" + idNumber);
if (barCode.length > 0) {
barCode.empty();
}
if (materialAndBarCodeList !== null && materialAndBarCodeList.length > 0) {
var barCodeInput = barCodeItem.childNodes[1].childNodes[1];
var barCodeImg = barCodeItem.childNodes[1].childNodes[3];
var id = barCodeInput.id;
var idNumber = materialId.name.split("mid")[1];
form.render();
$.each(materialAndBarCodeList, function (index, item) {
$("#barCode" + idNumber).append(new Option(item.bmcode, item.id));//往下拉菜单里添加元素
});
form.render();
}
var producedDateItem = $("#producedDate" + idNumber);
if (producedDateItem.length > 0) {
producedDateItem.empty();
}
var shelfLife = d.shelfLife;
if (shelfLife !== null && shelfLife !== undefined) {
$("#" + "producedDateItem" + idNumber).show();
var producedDateList = d['producedDateList'];
if (producedDateList != null && producedDateList != undefined && producedDateList.length > 0) {
$.each(producedDateList, function (index, item) {
$("#" + "producedDate" + idNumber).append(new Option(item, item));
})
}
form.render();
}
}
}
});
@ -834,7 +891,7 @@
// 计量单位父级
var unitChildren = parent.childNodes[17];
// 库存数量父级
var inventoryChildren = parent.childNodes[19];
var inventoryChildren = parent.childNodes[21];
// 条形码父级
var barCodeChildren = parent.childNodes[9];
@ -911,6 +968,12 @@
});
form.render();
}
var shelfLife = material.shelfLife;
if (shelfLife !== null && shelfLife !== undefined) {
$("#" + "producedDateItem" + idNumber).show();
$("#" + "producedDate" + idNumber).attr("lay-verify", "required");
}
}
}
});
@ -1018,7 +1081,7 @@
<label class="layui-form-label">库存数量:</label>
<div class="layui-input-block">
<input type="number" class="layui-input" readonly value="${obj.quantity}"
name=` + "oldInventory" + NewIdNumber + ` lay-verify="required"/>
name=` + "oldInventory" + NewIdNumber + ` id=` + "oldInventory" +NewIdNumber +` lay-verify="required"/>
</div>
</div>
<div class="layui-form-item">
@ -1063,127 +1126,96 @@
// 用于扫描物料编码
scanMaterialCodeForTaking = function (obj) {
if (depositoryId !== undefined && departmentManagerId !== undefined && departmentManagerId !== "") {
/*layer.open({
type: 2,
title: '扫码',
skin: 'layui-layer-rim',
maxmin: true,
shadeClose: true, //点击遮罩关闭层
area: ['100%', '100%'],
move: '.layui-layer-title',
fixed: false,
content: '/scanMaterialCodeForTaking?depositoryId=' + depositoryId + "&placeId=" + placeId,
end: function () {
parent.wx.scanQRCode({
desc: 'scanQRCode desc',
needResult: 1, // 默认为0,扫描结果由企业微信处理,1则直接返回扫描结果,
scanType: ["qrCode"], // 可以指定扫二维码还是条形码(一维码),默认二者都有
success: function (res) {
// 回调
var result = res.resultStr;//当needResult为1时返回处理结果
var req = {};
req.depositoryId = depositoryId;
req.qrCode = result;
req.placeId = placeId;
req.depositoryId = depositoryId;
$.ajax({
url: "/material/stockTaking_scanQrCode",
url: "/material/qywxStockTakingScanQrCode",
type: "post",
dataType: 'json',
data: JSON.stringify(req),
contentType: "application/json;charset=utf-8",
success: function (d) {
var data = d.data;
var materialList = data["materialList"];
if (materialList.length > 0) {
for (let i = 1; i <= materialList.length; i++) {
Coverpage(i, materialList[i - 1]);
var materialbyBarCodeList = materialList[i - 1]["materialAndBarCodeList"];
$.each(materialbyBarCodeList, function (index, item) {
$("#barCode" + i).append(new Option(item.bmcode, item.id));//往下拉菜单里添加元素
});
}
var parent = obj.parentNode.parentNode.parentNode.parentNode;
var parentId = parent.id;
// 物料编码父级
var codeChildren = parent.childNodes[7];
// 物料名称父级
var materialChildren = parent.childNodes[5];
// 物料类型父级
var typeChildren = parent.childNodes[11];
// 材质父级
var textureChildren = parent.childNodes[13];
// 规格型号父级
var versionChildren = parent.childNodes[15];
// 计量单位父级
var unitChildren = parent.childNodes[17];
// 库存数量父级
var inventoryChildren = parent.childNodes[21];
// 条形码父级
var barCodeChildren = parent.childNodes[9];
// 编码条目
var codeItem = codeChildren.childNodes[3].childNodes[1];
// 具体条码
var codeValue = codeItem.childNodes[1];
// 物料条目
var materialItem = materialChildren.childNodes[3].childNodes;
// 物料名称
var materialName = materialItem[1].childNodes[1];
// 物料编码
var materialId = materialItem[3];
// 物料种类条目
var materialTypeItem = typeChildren.childNodes[3].childNodes;
// 条形码条目
var barCodeItem = barCodeChildren.childNodes[3];
materialName.value = data.mname;
materialId.value = data.id;
materialTypeItem[1].value = data.typeName;
materialTypeItem[3].value = data.typeId;
codeValue.value = data.code;
textureChildren.childNodes[3].childNodes[1].value = data.texture === null || data.texture === undefined ? '' : data.texture;
versionChildren.childNodes[3].childNodes[1].value = data.version === null || data.version === undefined ? '' : data.version;
unitChildren.childNodes[3].childNodes[1].value = data.unit === null || data.unit === undefined ? '' : data.unit;
inventoryChildren.childNodes[3].childNodes[1].value = data.quantity;
// 获取物料与条形码的对应关系
var materialAndBarCodeList = data["materialAndBarCodeList"];
if (materialAndBarCodeList !== null && materialAndBarCodeList.length > 0) {
var barCodeInput = barCodeItem.childNodes[1].childNodes[1];
var barCodeImg = barCodeItem.childNodes[1].childNodes[3];
var id = barCodeInput.id;
var idNumber = materialId.name.split("mid")[1];
form.render();
$.each(materialAndBarCodeList, function (index, item) {
$("#barCode" + idNumber).append(new Option(item.bmcode, item.id));//往下拉菜单里添加元素
});
form.render();
}
var shelfLife = data.shelfLife;
if (shelfLife !== null && shelfLife !== undefined) {
$("#" + "producedDateItem" + idNumber).show();
$("#" + "producedDate" + idNumber).attr("lay-verify", "required");
}
}
})
}
})*/
parent.wx.scanQRCode({
desc: 'scanQRCode desc',
needResult: 1, // 默认为0,扫描结果由企业微信处理,1则直接返回扫描结果,
scanType: ["qrCode"], // 可以指定扫二维码还是条形码(一维码),默认二者都有
success: function (res) {
// 回调
var result = res.resultStr;//当needResult为1时返回处理结果
var req = {};
req.qrCode = result;
req.placeId = placeId;
req.depositoryId = depositoryId;
$.ajax({
url: "/material/qywxStockTakingScanQrCode",
type: "post",
dataType: 'json',
data: JSON.stringify(req),
contentType: "application/json;charset=utf-8",
success: function (d) {
var data = d.data;
var parent = obj.parentNode.parentNode.parentNode.parentNode;
var parentId = parent.id;
// 物料编码父级
var codeChildren = parent.childNodes[7];
// 物料名称父级
var materialChildren = parent.childNodes[5];
// 物料类型父级
var typeChildren = parent.childNodes[11];
// 材质父级
var textureChildren = parent.childNodes[13];
// 规格型号父级
var versionChildren = parent.childNodes[15];
// 计量单位父级
var unitChildren = parent.childNodes[17];
// 库存数量父级
var inventoryChildren = parent.childNodes[19];
// 条形码父级
var barCodeChildren = parent.childNodes[9];
// 编码条目
var codeItem = codeChildren.childNodes[3].childNodes[1];
// 具体条码
var codeValue = codeItem.childNodes[1];
// 物料条目
var materialItem = materialChildren.childNodes[3].childNodes;
// 物料名称
var materialName = materialItem[1].childNodes[1];
// 物料编码
var materialId = materialItem[3];
// 物料种类条目
var materialTypeItem = typeChildren.childNodes[3].childNodes;
// 条形码条目
var barCodeItem = barCodeChildren.childNodes[3];
materialName.value = data.mname;
materialId.value = data.id;
materialTypeItem[1].value = data.typeName;
materialTypeItem[3].value = data.typeId;
codeValue.value = data.code;
textureChildren.childNodes[3].childNodes[1].value = data.texture === null || data.texture === undefined ? '' : data.texture;
versionChildren.childNodes[3].childNodes[1].value = data.version === null || data.version === undefined ? '' : data.version;
unitChildren.childNodes[3].childNodes[1].value = data.unit === null || data.unit === undefined ? '' : data.unit;
inventoryChildren.childNodes[3].childNodes[1].value = data.quantity;
// 获取物料与条形码的对应关系
var materialAndBarCodeList = data["materialAndBarCodeList"];
if (materialAndBarCodeList !== null && materialAndBarCodeList.length > 0) {
var barCodeInput = barCodeItem.childNodes[1].childNodes[1];
var barCodeImg = barCodeItem.childNodes[1].childNodes[3];
var id = barCodeInput.id;
var idNumber = materialId.name.split("mid")[1];
form.render();
$.each(materialAndBarCodeList, function (index, item) {
$("#barCode" + idNumber).append(new Option(item.bmcode, item.id));//往下拉菜单里添加元素
});
form.render();
}
}
})
}
})
})
} else {
layer.msg("请先选择盘点位置或负责人", {
@ -1234,7 +1266,7 @@
// 计量单位父级
var unitChildren = parent.childNodes[17];
// 库存数量父级
var inventoryChildren = parent.childNodes[19];
var inventoryChildren = parent.childNodes[21];
// 条形码父级
var barCodeChildren = parent.childNodes[9];
@ -1265,6 +1297,12 @@
unitChildren.childNodes[3].childNodes[1].value = material.unit === null || material.unit === undefined ? '' : material.unit;
inventoryChildren.childNodes[3].childNodes[1].value = material.quantity;
$("#barCode" + id).append(new Option(result, 0));//往下拉菜单里添加元素
var shelfLife = material.shelfLife;
if (shelfLife !== null && shelfLife !== undefined) {
$("#" + "producedDateItem" + id).show();
$("#" + "producedDate" + id).attr("lay-verify", "required");
}
form.render();
}
if (barCodeListByNoMaterial.length > 0) {
@ -1292,7 +1330,7 @@
var btn = layero.find('.layui-layer-btn');
btn.find('.layui-layer-btn0').click(function () {
$.each(barCodeListByNoMaterial, function (index, item) {
$("#barCode" + id).append(new Option(item, index));//往下拉菜单里添加元素
$("#barCode" + id).append(new Option(item, item));//往下拉菜单里添加元素
});
barCodeList["barCode" + id] = barCodeListByNoMaterial;
needToUpdate["barCode" + id] = true;
@ -1319,10 +1357,10 @@
calculate = function (obj) {
var parent = obj.parentNode.parentNode.parentNode;
var oldInventoryItem = parent.childNodes[19].childNodes[3].childNodes[1];
var nowInventoryItem = parent.childNodes[21].childNodes[3].childNodes[1];
var resultItem = parent.childNodes[23].childNodes[3].childNodes[1];
var InventoryItem = parent.childNodes[25].childNodes[3].childNodes[1];
var oldInventoryItem = parent.childNodes[21].childNodes[3].childNodes[1];
var nowInventoryItem = parent.childNodes[23].childNodes[3].childNodes[1];
var resultItem = parent.childNodes[25].childNodes[3].childNodes[1];
var InventoryItem = parent.childNodes[27].childNodes[3].childNodes[1];
var oldInventory = Number(oldInventoryItem.value);
var nowInventory = Number(nowInventoryItem.value);
@ -1341,7 +1379,28 @@
$("#" + InventoryItem.id).val(nowInventory - oldInventory);
}
form.render();
}
};
form.on('select()', function (data) {
var id = data.elem.id; //得到select原始DOM对象id
if(id.includes("producedDate")) {
var idNumber = id.split('producedDate')[1]; // 得到当前id对应数字
var req = {};
req.mid = $("#" + "mid" + idNumber).val();
req.producedDate = data.value;
$.ajax({
url: "/material/findQuantityByProducedDate",
type: "post",
dataType: 'json',
data: JSON.stringify(req),
contentType: "application/json;charset=utf-8",
success: function (d) {
$("#" + "oldInventory" + idNumber).val(d.data)
}
});
}
});
});
</script>

191
src/test/java/com/dreamchaser/depository_manage/TestForManagerTree.java

@ -0,0 +1,191 @@
package com.dreamchaser.depository_manage;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.dreamchaser.depository_manage.config.PortConfig;
import com.dreamchaser.depository_manage.entity.Administration;
import com.dreamchaser.depository_manage.entity.User;
import com.dreamchaser.depository_manage.entity.UserByPort;
import com.dreamchaser.depository_manage.pojo.AdministrationP;
import com.dreamchaser.depository_manage.service.impl.CompanyServiceImpl;
import com.dreamchaser.depository_manage.utils.HttpUtils;
import org.apache.http.protocol.HTTP;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.*;
@SpringBootTest
@RunWith(SpringRunner.class)
public class TestForManagerTree {
@Test
public void test(){
Map<String,Object> map =new HashMap<>();
List<AdministrationP> administrationPList = findAllCompanyByParent(map, null);
// 开启对应数量的线程
ExecutorService exs = Executors.newFixedThreadPool(administrationPList.size());
// 结果集
List<Object> list = new ArrayList<>();
List<Future<Object>> futureList = new ArrayList<Future<Object>>();
// 1.定义CompletionService
CompletionService<Object> completionService = new ExecutorCompletionService<Object>(exs);
for (int i = 0; i < administrationPList.size(); i++) {
AdministrationP administrationP = administrationPList.get(i);
Future<Object> future = completionService.submit(new InitManagerForAdministration(administrationP,null));
futureList.add(future);
}
for (int i = 0; i < administrationPList.size(); i++) {
Object result = null;
try {
result = completionService.take().get();
} catch (InterruptedException e) {
e.printStackTrace();
} catch (ExecutionException e) {
e.printStackTrace();
}
list.add(result);
}
System.out.println(JSONObject.toJSONString(list));
}
class InitManagerForAdministration implements Callable<Object>{
AdministrationP administrationP;
UserByPort userToken;
InitManagerForAdministration(AdministrationP administrationP,UserByPort userToken){
this.administrationP = administrationP;
this.userToken = userToken;
}
@Override
public Object call() throws Exception {
List<UserByPort> allUserByAdministration = findAllUserByAdministration(administrationP.getId(), userToken);
List<Object> objectList = addDepartmentHead(administrationP, allUserByAdministration);
Map<String, Object> map = InitTreeMenus(administrationP, objectList);
return map;
}
}
/**
* 用于获取当前公司下所有部门
* @param map 查询条件
* @param userToken 登录用户
* @return
*/
public List<AdministrationP> findAllCompanyByParent(Map<String,Object> map, UserByPort userToken){
String url = PortConfig.external_url +"/org/govlist";
String superior = (String) map.get("superior");
if(superior == null || "".equals(superior)){
superior = "309";
}
map.put("superior",superior);
map.put("state",1);
map.put("level",4);
String jsonString = JSONObject.toJSONString(map);
JSONObject paramObject = JSONObject.parseObject(jsonString);
String post = null;
try {
post = HttpUtils.send(url,paramObject, HTTP.UTF_8,userToken);
} catch (IOException e) {
e.printStackTrace();
}
JSONObject jsonObject = JSONObject.parseObject(post);
JSONObject data = (JSONObject) jsonObject.get("data");
JSONArray list = (JSONArray) data.get("list");
if(list == null){
list = new JSONArray();
}
List<AdministrationP> administrationPList = new ArrayList<>();
for (int i = 0; i < list.size(); i++) {
Administration administration = JSONObject.toJavaObject((JSONObject)list.get(i), Administration.class);
AdministrationP administrationP = new AdministrationP(administration);
administrationPList.add(administrationP);
}
return administrationPList;
}
/**
* 用于获取当前部门下所有的人
* @param adminorg 部门id
* @param userToken 登录用户
* @return
*/
public List<UserByPort> findAllUserByAdministration(Integer adminorg,UserByPort userToken){
String url = PortConfig.external_url +"/staff/archiveslist";
Map<String,Object> map = new HashMap<>();
map.put("adminorg",adminorg);
String jsonString = JSONObject.toJSONString(map);
JSONObject paramObject = JSONObject.parseObject(jsonString);
String post = null;
try {
post = HttpUtils.send(url,paramObject, HTTP.UTF_8,userToken);
} catch (IOException e) {
e.printStackTrace();
}
JSONObject jsonObject = JSONObject.parseObject(post);
JSONObject data = (JSONObject) jsonObject.get("data");
JSONArray list = (JSONArray) data.get("list");
if(list == null){
list = new JSONArray();
}
List<UserByPort> userByPortList = new ArrayList<>();
for (int i = 0; i < list.size(); i++) {
UserByPort userByPort = JSONObject.toJavaObject((JSON) list.get(i), UserByPort.class);
if(Integer.compare(userByPort.getPersonincharge(),1) == 0) {
userByPortList.add(userByPort);
}
}
return userByPortList;
}
/**
* 用于给当前部门添加部门负责人
* @param ap
* @return
*/
public List<Object> addDepartmentHead(AdministrationP ap,List<UserByPort> departmentHeadByUser){
// 获取当前部门的部门负责人
Map<String,Object> map = new HashMap<>();
map.put("adminorg",ap.getId());
List<Object> result = new ArrayList<>();
for (int i = 0; i < departmentHeadByUser.size(); i++) {
UserByPort user = departmentHeadByUser.get(i);
Map<String, Object> children = new HashMap<>();
children.put("title",user.getName());
children.put("id",user.getId());
result.add(children);
}
return result;
}
// 构造树形组件数据模板
public Map<String,Object> InitTreeMenus(AdministrationP ap, List<Object> children){
if(ap != null) {
Map<String, Object> map = new HashMap<>();
map.put("title",ap.getName());
map.put("id", ap.getId());
map.put("children",children);
return map;
}
else{
return null;
}
}
}

4
src/test/java/com/dreamchaser/depository_manage/Test.java → src/test/java/com/dreamchaser/depository_manage/TestForMaterialTree.java

@ -82,7 +82,7 @@ import org.xml.sax.InputSource;
@SpringBootTest
@RunWith(SpringRunner.class)
public class Test {
public class TestForMaterialTree {
@Autowired
@ -99,7 +99,7 @@ public class Test {
@org.junit.Test
public void test1() throws AesException, IOException, ParserConfigurationException, SAXException {
// List<Object> objectList = InitTree_Test();
}

2
src/test/java/com/dreamchaser/depository_manage/Test2.java → src/test/java/com/dreamchaser/depository_manage/TestForThisWeekInventory.java

@ -28,7 +28,7 @@ import java.util.concurrent.*;
@SpringBootTest
@RunWith(SpringRunner.class)
public class Test2 {
public class TestForThisWeekInventory {
@Autowired

2
src/test/java/com/dreamchaser/depository_manage/Test3.java → src/test/java/com/dreamchaser/depository_manage/TestForgetShowData.java

@ -27,7 +27,7 @@ import java.util.concurrent.*;
@SpringBootTest
@RunWith(SpringRunner.class)
public class Test3 {
public class TestForgetShowData {
@Autowired
MaterialTypeService materialTypeService;

0
target/classes/.restartTriggerFile

4
target/classes/META-INF/MANIFEST.MF

@ -1,4 +0,0 @@
Manifest-Version: 1.0
Main-Class: com.dreamchaser.depository_manage.DepositoryManageApplicatio
n

17
target/classes/META-INF/spring-configuration-metadata.json

@ -1,17 +0,0 @@
{
"groups": [
{
"name": "file",
"type": "com.dreamchaser.depository_manage.config.FileConfig",
"sourceType": "com.dreamchaser.depository_manage.config.FileConfig"
}
],
"properties": [
{
"name": "file.upload-path",
"type": "java.lang.String",
"sourceType": "com.dreamchaser.depository_manage.config.FileConfig"
}
],
"hints": []
}

87
target/classes/application-test.yml

@ -1,87 +0,0 @@
#开启健康检查、审计、统计和监控,即可通过访问/actuator/beans等查看状态
management:
endpoints:
web:
exposure:
include: beans,health
spring:
mobile:
sitepreference:
enabled:true
servlet:
multipart:
enabled: true
max-file-size: 100MB # 单个文件上传的最大上限
max-request-size: 100MB # 一次请求总大小上限
##数据库设置
datasource:
username: root
password: root
url: jdbc:mysql://localhost:3306/depository?serverTimezone=Asia/Shanghai&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf8
driver-class-name: com.mysql.cj.jdbc.Driver
type: com.alibaba.druid.pool.DruidDataSource
initialSize: 5
minIdle: 5
maxActive: 10
maxWait: 60000
timeBetweenEvictionRunsMillis: 60000
minEvictableIdleTimeMillis: 300000
validationQuery: SELECT 1 FROM DUAL
useGlobalDataSourceStat: true
server:
port: 9090
testWhileIdle: true
testOnReturn: false
testOnBorrow: false
poolPreparedStatements: true
maxPoolPreparedStatementPerConnectionSize: 20
#配置监控统计拦截的filters,去掉后监控界面sql将无法统计,'wall'用于防火墙
filters: stat, wall, log4j
connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
#超时回收机制
removeAbandoned: true
removeAbandonedTimeout: 1800
logAbandoned: true
banner:
location: banner.txt
thymeleaf:
cache: false
mode: HTML
mvc:
hiddenmethod:
filter:
enabled: true
view:
prefix: /templates/
suffix: .html
static-path-pattern: /static/**
redis:
port: 6379
host: 127.0.0.1
database: 0
jedis:
pool:
min-idle: 10
max-idle: 20
max-wait: -1ms
max-active: 200
timeout: 2000ms
server:
mybatis:
type-aliases-package: com.dreamchaser.depository_manage.entity
configuration:
log-impl: org.apache.ibatis.logging.slf4j.Slf4jImpl
log-prefix: mapper.
#mybatis-plus:
# configuration:
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
file:
uploadPath: D:/upLoad

5
target/classes/application.yml

@ -1,5 +0,0 @@
spring:
profiles:
active: test
server:
port: 11111

14
target/classes/banner.txt

@ -1,14 +0,0 @@
,---, ____ ,---,
.' .' `\ ,' , `. ,--.' |
,---.' \ __ ,-. ,-+-,.' _ | | | : __ ,-.
| | .`\ |,' ,'/ /| ,-+-. ; , || : : : .--.--. ,' ,'/ /|
: : | ' |' | |' | ,---. ,--.--. ,--.'|' | || ,---. : | |,--. ,--.--. / / ' ,---. ' | |' |
| ' ' ; :| | ,'/ \ / \ | | ,', | |,/ \ | : ' | / \ | : /`./ / \ | | ,'
' | ; . |' : / / / | .--. .-. | | | / | |--'/ / ' | | /' :.--. .-. | | : ;_ / / |' : /
| | : | '| | ' . ' / | \__\/: . . | : | | , . ' / ' : | | | \__\/: . . \ \ `. . ' / || | '
' : | / ; ; : | ' ; /| ," .--.; | | : | |/ ' ; :__ | | ' | : ," .--.; | `----. \' ; /|; : |
| | '` ,/ | , ; ' | / | / / ,. | | | |`-' ' | '.'|| : :_:,'/ / ,. | / /`--' /' | / || , ;
; : .' ---' | : |; : .' \| ;/ | : :| | ,' ; : .' \'--'. / | : | ---'
| ,.' \ \ / | , .-./'---' \ \ / `--'' | , .-./ `--'---' \ \ /
'---' `----' `--`---' `----' `--`---' `----'

108
target/classes/com/dreamchaser/depository_manage/mapper/AccesstoAddressMapper.xml

@ -1,108 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!-- depository -->
<mapper namespace="com.dreamchaser.depository_manage.mapper.AccesstoAddressMapper">
<!-- This code was generated by TableGo tools, mark 1 begin. -->
<!-- 字段映射 -->
<resultMap id="accesstoAddress" type="com.dreamchaser.depository_manage.entity.AccesstoAddress">
<id column="id" property="id" jdbcType="INTEGER" />
<result column="name" property="name" jdbcType="VARCHAR" />
<result column="url" property="url" jdbcType="VARCHAR" />
<result column="type" property="type" jdbcType="INTEGER" />
<result column="role_id" property="role_id" jdbcType="INTEGER" />
<result column="menuparent" property="menuparent" jdbcType="INTEGER" />
<result column="state" property="state" jdbcType="INTEGER" />
<result column="icon" property="icon" jdbcType="VARCHAR"/>
<result column="target" property="target" jdbcType="VARCHAR"/>
<result column="ischild" property="ischild" jdbcType="INTEGER"/>
</resultMap>
<!-- This code was generated by TableGo tools, mark 1 end. -->
<!-- This code was generated by TableGo tools, mark 2 begin. -->
<!-- 表查询字段 -->
<sql id="allColumns">
a.id,a.name,a.url ,a.`type` ,a.role_id ,a.menuparent ,a.state,a.icon,a.target,a.ischild
</sql>
<select id="findAllMenus" resultMap="accesstoAddress">
select
<include refid="allColumns"></include>
from accesstoaddress a
where a.state != 3
</select>
<select id="findAccessstoAddressByParentAndRole" resultMap="accesstoAddress" parameterType="map">
select
<include refid="allColumns"/>
from accesstoaddress a
where 1 = 1
<if test="roleId != null and roleId != ''">
and a.role_id = #{roleId}
</if>
<if test="menuparent != null and menuparent != ''">
and a.menuparent = #{menuparent}
</if>
and a.state != 3
</select>
<select id="findMenusByRole" resultMap="accesstoAddress" parameterType="map">
select
<include refid="allColumns"/>
from accesstoaddress a
where 1 = 1
<if test="type != null and type != ''">
and type = #{type}
</if>
<if test="roleId != null and roleId != ''">
and a.role_id = #{roleId}
</if>
<if test="menuparent != null and menuparent != ''">
and a.menuparent = #{menuparent}
</if>
and a.state != 3
</select>
<select id="findMenusByNoParent" resultMap="accesstoAddress">
select
<include refid="allColumns"></include>
from accesstoaddress a
where 1 = 1
and a.menuparent = 0
</select>
<select id="findAccessstoAddressByParent" resultMap="accesstoAddress" parameterType="INTEGER">
select
<include refid="allColumns"></include>
from accesstoaddress a
where 1 = 1
and a.menuparent = #{id}
</select>
<select id="findAccessToAddressByUser" resultMap="accesstoAddress" parameterType="map">
select
<include refid="allColumns"/>
from
AccessToAddressByUser a
where authority = #{roleId}
<if test="userId != '' and userId != null ">
and uid = #{userId}
</if>
<if test="menuparent != null and menuparent != ''">
and menuparent = #{menuparent}
</if>
</select>
<select id="findAccessToAddressByList" resultMap="accesstoAddress" parameterType="list">
select
<include refid="allColumns"/>
from accesstoaddress a
where a.id in
<foreach collection="list" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</select>
</mapper>

35
target/classes/com/dreamchaser/depository_manage/mapper/CallBackLogMapper.xml

@ -1,35 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!-- depository -->
<mapper namespace="com.dreamchaser.depository_manage.mapper.CallBackLogMapper">
<resultMap id="callBackMap" type="com.dreamchaser.depository_manage.entity.CallBackLog">
<id column="id" property="id" jdbcType="INTEGER" />
<result column="msg_signature" property="msg_signature" jdbcType="VARCHAR" />
<result column="timestamp" property="timestamp" jdbcType="INTEGER" />
<result column="nonce" property="nonce" jdbcType="VARCHAR" />
<result column="echostr" property="echostr" jdbcType="VARCHAR" />
<result column="xmlstr" property="xmlstr" jdbcType="VARCHAR" />
<result column="jsonstr" property="jsonstr" jdbcType="VARCHAR" />
<result column="reqdata" property="reqdata" jdbcType="VARCHAR"/>
<result column="addtime" property="addtime" jdbcType="INTEGER"/>
</resultMap>
<insert id="addCallBackLog">
INSERT INTO callback_log (
id, msg_signature, timestamp,nonce,echostr,xmlstr,jsonstr,reqdata,addtime
) VALUES (
#{id},
#{msg_signature},
#{timestamp},
#{nonce},
#{echostr},
#{xmlstr},
#{jsonstr},
#{reqdata},
#{addtime}
)
</insert>
</mapper>

168
target/classes/com/dreamchaser/depository_manage/mapper/CompanyMapper.xml

@ -1,168 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!-- depository -->
<mapper namespace="com.dreamchaser.depository_manage.mapper.CompanyMapper">
<!-- This code was generated by TableGo tools, mark 1 begin. -->
<!-- 字段映射 -->
<resultMap id="companyMap" type="com.dreamchaser.depository_manage.entity.Company">
<id column="cid" property="cid" jdbcType="INTEGER" />
<result column="cname" property="cname" jdbcType="VARCHAR" />
<result column="state" property="state" jdbcType="INTEGER"/>
<result column="parentId" property="parentId" jdbcType="INTEGER"/>
<result column="introduce" property="introduce" jdbcType="VARCHAR"/>
</resultMap>
<!-- This code was generated by TableGo tools, mark 1 end. -->
<!-- This code was generated by TableGo tools, mark 2 begin. -->
<!-- 表查询字段 -->
<sql id="allColumns">
c.cid, c.cname ,c.state , c.parentId,c.introduce
</sql>
<!-- 查询所有数据 -->
<select id="findCompanyAll" resultMap="companyMap">
SELECT
<include refid="allColumns" />
FROM company c
Where c.state != 3
</select>
<select id="findcompanyById" resultMap="companyMap" parameterType="int">
select <include refid="allColumns"/>
from company c
where c.cid = #{id}
</select>
<!-- 根据条件查询公司-->
<select id="findCompanyByCondition" resultMap="companyMap" parameterType="map">
select
<include refid="allColumns"/>
from company c
where 1 = 1
<if test="id != null and id !=''">
and c.cid = #{id}
</if>
<if test="cname != null and cname != ''">
and c.cname LIKE CONCAT('%', #{cname}, '%')
</if>
<if test="introduce != null and introduce !=''">
and c.introduce LIKE CONCAT('%', #{introduce}, '%')
</if>
<if test="parentId != null">
AND c.parentId = #{parentId}
</if>
<if test="state != null">
and c.state = #{state}
</if>
and c.state != 3
</select>
<!-- 根据条件参数查询数据列表数目 -->
<select id="findCountByCondition" resultType="int" parameterType="map">
SELECT count(*)
from company c
where 1 = 1
<if test="id != null and id !=''">
and c.cid = #{id}
</if>
<if test="cname != null and cname != ''">
and c.cname LIKE CONCAT('%', #{cname}, '%')
</if>
<if test="introduce != null and introduce !=''">
and c.introduce LIKE CONCAT('%', #{introduce}, '%')
</if>
<if test="parentId != null">
AND c.parentId = #{parentId}
</if>
and c.state != 3
</select>
<!--根据父级查询公司信息-->
<select id="findCompanyByParentId" resultMap="companyMap" parameterType="int">
select
<include refid="allColumns"/>
from company c
where c.state != 3 and c.parentId = #{parentId}
</select>
<!-- 根据主键删除数据 -->
<delete id="deleteCompanyById" parameterType="int">
DELETE FROM company WHERE cid = #{id}
</delete>
<!-- 根据主键批量删除数据 -->
<delete id="deleteCompanyByIds" parameterType="list">
DELETE FROM company WHERE cid IN
<foreach collection="list" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<!-- 修改数据 -->
<update id="updateCompany" parameterType="map">
UPDATE company
<set>
<if test="cname != null">
cname = #{cname},
</if>
<if test="introduce != null">
introduce = #{introduce},
</if>
<if test="state != null">
state = #{state},
</if>
<if test="parentId != null">
parentId = #{parentId}
</if>
</set>
WHERE cid = #{id}
</update>
<!--插入数据-->
<insert id="insertCompany" parameterType="map">
INSERT INTO company (
cid, cname, introduce,parentId
) VALUES (
#{id},
#{cname},
#{introduce},
#{parentId}
)
</insert>
<!-- 根据主键将状态改为删除-->
<update id="changeStateToDeletedById" parameterType="int">
update company
<set>
state = 3
</set>
where cid = #{id}
</update>
<!-- 根据主键批量将状态改为删除-->
<update id="changeStateToDeletedByIds" parameterType="list">
update company
<set>
state = 3
</set>
where cid in
<foreach collection="list" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</update>
<update id="updateStateByParam" parameterType="map">
update company
<set>
state = #{state}
</set>
where cid = #{cid}
<if test="oldState != null">
and state = #{oldState}
</if>
and state != 3
</update>
</mapper>

363
target/classes/com/dreamchaser/depository_manage/mapper/DepositoryMapper.xml

@ -1,363 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!-- depository -->
<mapper namespace="com.dreamchaser.depository_manage.mapper.DepositoryMapper">
<!-- This code was generated by TableGo tools, mark 1 begin. -->
<!-- 字段映射 -->
<resultMap id="depositoryMap" type="com.dreamchaser.depository_manage.entity.Depository">
<id column="id" property="id" jdbcType="INTEGER" />
<result column="dname" property="dname" jdbcType="VARCHAR" />
<result column="address" property="address" jdbcType="VARCHAR" />
<result column="introduce" property="introduce" jdbcType="VARCHAR" />
<result column="parentId" property="parentId" jdbcType="INTEGER"/>
<result column="cid" property="cid" jdbcType="INTEGER"/>
<result column="code" property="code" jdbcType="VARCHAR"/>
<result column="adminorg" property="adminorg" jdbcType="VARCHAR"/>
<result column="minNumber" property="minNumber" jdbcType="INTEGER"/>
<result column="maxNumber" property="maxNumber" jdbcType="INTEGER"/>
</resultMap>
<resultMap id="inventoryByDname" type="com.dreamchaser.depository_manage.pojo.InventoryByDname">
<result column="inventory" property="inventory" jdbcType="INTEGER"/>
<result column="dname" property="dname" jdbcType="VARCHAR"/>
</resultMap>
<!-- This code was generated by TableGo tools, mark 1 end. -->
<!-- This code was generated by TableGo tools, mark 2 begin. -->
<!-- 表查询字段 -->
<sql id="allColumns">
d.id, d.dname, d.address, d.introduce,d.state,d.parentId,d.cid,d.code,d.adminorg,d.maxNumber,d.minNumber
</sql>
<!-- 视图查询字段-->
<sql id="depositoryAndCompany">
id,dname,address,introduce,state,parentId,cid,cname,code,adminorg,minNumber,maxNumber
</sql>
<!-- This code was generated by TableGo tools, mark 2 end. -->
<!-- 根据id获取仓库名称 -->
<select id="findDepositoryNameById" resultType="string" parameterType="int">
SELECT
d.dname
FROM depository d where d.id=#{id}
</select>
<!-- &lt;!&ndash; 查询所有数据 &ndash;&gt;
<select id="findDepositoryAll" resultMap="depositoryMap">
SELECT
<include refid="allColumns" />
FROM depository d
Where d.state != 3
</select>-->
<!-- 查询所有数据 -->
<select id="findDepositoryAll" resultMap="depositoryMap">
SELECT
<include refid="depositoryAndCompany" />
FROM depositoryandcompany dc
Where dc.state != 3
</select>
<!-- 获取当前部门仓库以及公共仓库-->
<select id="findDepositoryByAdminorg" resultMap="depositoryMap" parameterType="string">
SELECT
<include refid="allColumns" />
FROM depository d WHERE 1 = 1 and d.state != 3
<if test="adminorg != null and adminorg != ''">
and d.adminorg = #{adminorg}
</if>
or d.adminorg = ''
</select>
<!-- 根据仓库编码获取仓库-->
<select id="findDepositoryByCode" resultMap="depositoryMap" parameterType="string">
SELECT
<include refid="allColumns" />
FROM depository d WHERE 1 = 1 and d.state != 3
<if test="depositoryCode != null and depositoryCode !=''">
and d.code = #{depositoryCode}
</if>
</select>
<select id="findDepositoryByAdminorgAndParent" resultMap="depositoryMap" parameterType="map">
SELECT
<include refid="allColumns" />
FROM depository d WHERE 1 = 1
<if test="adminorg != null and adminorg != ''">
and (d.adminorg = #{adminorg} or d.adminorg = 361)
</if>
<if test="parentId != null">
AND d.parentId = #{parentId}
</if>
or d.adminorg = '' and d.state != 3
</select>
<!-- 根据主键查询多个数据-->
<select id="selectDepositoryRecordByIds" parameterType="list" resultMap="depositoryMap">
select
<include refid="allColumns"></include>
FROM depository WHERE id IN
<foreach collection="list" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</select>
<!-- 根据条件查询数据列表 -->
<select id="findDepositoryRecordPByCondition" resultMap="depositoryMap" parameterType="map">
SELECT
<include refid="allColumns" />
FROM depository d WHERE 1 = 1
<if test="depositoryId != null">
AND d.id = #{depositoryId}
</if>
<if test="dname != null and dname != ''">
AND d.dname LIKE CONCAT('%', #{dname}, '%')
</if>
<if test="address != null and address != ''">
AND d.address LIKE CONCAT('%', #{address}, '%')
</if>
<if test="introduce != null and introduce != ''">
AND d.introduce LIKE CONCAT('%', #{introduce}, '%')
</if>
<if test="state != null and state != '' ">
AND d.state = #{state}
</if>
<if test="parentId != null">
AND d.parentId = #{parentId}
</if>
<if test="cid != null">
and d.cid = #{cid}
</if>
<if test="adminorg != null">
and (d.adminorg = #{adminorg} or d.adminorg = '')
</if>
AND d.state != 3
<if test="begin != null and size != null">
LIMIT #{begin},#{size}
</if>
</select>
<!-- 根据条件参数查询数据列表数目 -->
<select id="findCountByCondition" resultType="int" parameterType="map">
SELECT count(*)
FROM depository d WHERE 1 = 1
<if test="dname != null and dname != ''">
AND d.dname LIKE CONCAT('%', #{dname}, '%')
</if>
<if test="address != null and address != ''">
AND d.address LIKE CONCAT('%', #{address}, '%')
</if>
<if test="introduce != null and introduce != ''">
AND d.introduce LIKE CONCAT('%', #{introduce}, '%')
</if>
<if test="state != null and state != '' ">
AND d.state = #{state}
</if>
<if test="parentId != null">
AND d.parentId = #{parentId}
</if>
<if test="cid != null">
and d.cid = #{cid}
</if>
<if test="adminorg != null">
and d.adminorg = #{adminorg}
</if>
AND d.state != 3
</select>
<select id="getParentByDepository" resultMap="depositoryMap" parameterType="int">
SELECT
<include refid="allColumns" />
FROM depository d WHERE d.parentId = #{parentId}
</select>
<!-- 根据主键查询数据-->
<select id="findDepositoryById" resultMap="depositoryMap" parameterType="Integer">
SELECT
<include refid="allColumns" />
FROM depository d WHERE d.id = #{id}
</select>
<!-- 插入数据 -->
<insert id="insertDepository" parameterType="map">
INSERT INTO depository (
id, dname, address, introduce,parentId,cid,code,adminorg,maxNumber,minNumber
) VALUES (
#{id},
#{dname},
#{address},
#{introduce},
#{parentId},
#{cid},
#{code},
#{adminorg},
#{maxNumber},
#{minNumber}
)
</insert>
<!-- 批量插入数据
<insert id="insertDepositorys" parameterType="list">
INSERT INTO depository (
id, dname, address, introduce
) VALUES
<foreach collection="list" index="index" item="item" separator=",">
(
#{item.id},
#{item.dname},
#{item.address},
#{item.introduce}
)
</foreach>
</insert>
-->
<!-- 修改数据 -->
<update id="updateDepository" parameterType="map">
UPDATE depository
<set>
<if test="dname != null">
dname = #{dname},
</if>
<if test="address != null">
address = #{address},
</if>
<if test="introduce != null">
introduce = #{introduce},
</if>
<if test="state != null">
state = #{state},
</if>
<if test="parentId != null">
parentId = #{parentId},
</if>
<if test="cid != null">
cid = #{cid},
</if>
<if test="adminorg != null">
adminorg = #{adminorg},
</if>
<if test="code != null">
code = #{code},
</if>
<if test="minNumber != null and minNumber != ''">
minNumber = #{minNumber},
</if>
<if test="maxNumber != null and maxNumber != ''">
maxNumber = #{maxNumber}
</if>
</set>
WHERE id = #{id}
</update>
<!-- 批量修改数据
<update id="updateDepositorys" parameterType="list">
<foreach collection="list" index="index" item="item" separator=";">
UPDATE depository
<set>
<if test="item.dname != null">
dname = #{item.dname},
</if>
<if test="item.address != null">
address = #{item.address},
</if>
<if test="item.introduce != null">
introduce = #{item.introduce}
</if>
</set>
WHERE id = #{item.id}
</foreach>
</update>-->
<!-- 根据主键删除数据 -->
<delete id="deleteDepositoryRecordById" parameterType="int">
DELETE FROM depository WHERE id = #{id}
</delete>
<!-- 根据主键批量删除数据-->
<delete id="deleteDepositoryRecordByIds" parameterType="list">
DELETE FROM depository WHERE id IN
<foreach collection="list" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<!-- 根据主键将状态改为删除-->
<update id="changeStateToDeletedById" parameterType="int">
UPDATE depository
<set>
state = 3
</set>
WHERE id = #{id}
</update>
<update id="updateStateByParam" parameterType="map">
UPDATE depository
<set>
state = #{state}
</set>
where id = #{id}
<if test="oldState != null">
and state = #{oldState}
</if>
and state != 3
</update>
<!-- 根据主键批量将状态改为删除-->
<update id="changeStateToDeletedByIds" parameterType="list">
update depository
<set>
state = 3
</set>
where id in
<foreach collection="list" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</update>
<!-- 获取仓库总数-->
<select id="findAllCountByState" resultType="int">
select count(*)
from depository d
where d.state != 3
</select>
<select id="getToDayInventoryByDName" resultType="double" parameterType="map">
select ifnull(sum(quantity),0.0)
from depositoryAndmaterial
where 1 = 1
<if test="dname != null and dname !=''">
and dname = #{dname}
</if>
<if test="dcode != null and dcode !=''">
and dcode = #{dcode}
</if>
</select>
<select id="getToDayInventoryByDNameTest" resultMap="inventoryByDname">
select ifnull(sum(quantity),0.0) as inventory ,dname
from depositoryAndmaterial
where 1 = 1
GROUP BY dname
</select>
<select id="findUserNameByDepositoryId" resultType="string" parameterType="int">
select uname
from depositoryanduser
where did = #{depositoryId}
</select>
</mapper>

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

File diff suppressed because it is too large

728
target/classes/com/dreamchaser/depository_manage/mapper/MaterialMapper.xml

@ -1,728 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!-- 产品信息记录(库存)(material) -->
<mapper namespace="com.dreamchaser.depository_manage.mapper.MaterialMapper">
<!-- This code was generated by TableGo tools, mark 1 begin. -->
<!-- 字段映射 -->
<resultMap id="materialMap" type="com.dreamchaser.depository_manage.entity.Material">
<id column="id" property="id" jdbcType="INTEGER" />
<result column="depository_id" property="depositoryId" jdbcType="INTEGER" />
<result column="mname" property="mname" jdbcType="VARCHAR" />
<result column="quantity" property="quantity" jdbcType="VARCHAR" />
<result column="price" property="price" jdbcType="INTEGER" />
<result column="type_id" property="materialTypeId" jdbcType="INTEGER" />
<result column="state" property="state" jdbcType="INTEGER" />
<result column="code" property="code" jdbcType="VARCHAR"/>
<result column="version" property="version" jdbcType="VARCHAR"/>
<result column="amounts" property="amounts" jdbcType="INTEGER"/>
<result column="unit" property="unit" jdbcType="VARCHAR"/>
<result column="texture" property="texture" jdbcType="VARCHAR"/>
<result column="number_of_temporary" property="numberOfTemporary" jdbcType="INTEGER"/>
<result column="producedDate" property="producedDate" jdbcType="INTEGER"/>
<result column="shelfLife" property="shelfLife" jdbcType="INTEGER"/>
<result column="productionPlace" property="productionPlace" jdbcType="VARCHAR"/>
<result column="brand" property="brand" jdbcType="VARCHAR"/>
<result column="remark" property="remark" jdbcType="VARCHAR"/>
</resultMap>
<!-- 字段映射-->
<resultMap id="materialAndTypeMap" type="com.dreamchaser.depository_manage.entity.Material">
<id column="id" property="id" jdbcType="INTEGER" />
<result column="depository_id" property="depositoryId" jdbcType="INTEGER" />
<result column="mname" property="mname" jdbcType="VARCHAR" />
<result column="quantity" property="quantity" jdbcType="VARCHAR" />
<result column="price" property="price" jdbcType="VARCHAR" />
<result column="type_id" property="materialTypeId" jdbcType="INTEGER" />
<result column="state" property="state" jdbcType="VARCHAR" />
<result column="code" property="code" jdbcType="VARCHAR"/>
<result column="version" property="version" jdbcType="VARCHAR"/>
<result column="amounts" property="amounts" jdbcType="DOUBLE"/>
<result column="unit" property="unit" jdbcType="VARCHAR"/>
<result column="texture" property="texture" jdbcType="VARCHAR"/>
<result column="depositoryCode" property="depositoryCode" jdbcType="VARCHAR"/>
<result column="producedDate" property="producedDate" jdbcType="INTEGER"/>
<result column="shelfLife" property="shelfLife" jdbcType="INTEGER"/>
<result column="productionPlace" property="productionPlace" jdbcType="VARCHAR"/>
<result column="brand" property="brand" jdbcType="VARCHAR"/>
<result column="remark" property="remark" jdbcType="VARCHAR"/>
<association property="materialType" column="typeId" javaType="com.dreamchaser.depository_manage.entity.MaterialType">
<id column="id" property="id" jdbcType="INTEGER" />
<result column="tname" property="tname" jdbcType="VARCHAR" />
<result column="introduce" property="introduce" jdbcType="VARCHAR" />
</association>
<association property="depository" column="depositoryId" javaType="com.dreamchaser.depository_manage.entity.Depository">
<id column="id" property="id" jdbcType="INTEGER" />
<result column="dname" property="dname" jdbcType="VARCHAR" />
<result column="address" property="address" jdbcType="VARCHAR" />
<result column="introduce" property="introduce" jdbcType="VARCHAR" />
</association>
</resultMap>
<!-- 条形码与物料对应-->
<resultMap id="BarCodeAndMaterialMap" type="com.dreamchaser.depository_manage.entity.MaterialAndBarCode">
<id column="id" property="id" jdbcType="INTEGER" />
<result column="price" property="price" jdbcType="INTEGER" />
<result column="texture" property="texture" jdbcType="VARCHAR"/>
<result column="mname" property="mname" jdbcType="VARCHAR"/>
<result column="unit" property="unit" jdbcType="VARCHAR"/>
<result column="version" property="version" jdbcType="VARCHAR"/>
<result column="tname" property="tname" jdbcType="VARCHAR"/>
<result column="mcode" property="mcode" jdbcType="VARCHAR"/>
<result column="bmcode" property="bmcode" jdbcType="VARCHAR"/>
<result column="mid" property="mid" jdbcType="INTEGER"/>
<result column="mtid" property="mtid" jdbcType="INTEGER"/>
</resultMap>
<!-- 表查询字段 -->
<sql id="allColumns">
m.id, m.depository_id, m.mname, m.quantity, m.price, m.type_id,m.state,m.code ,m.version ,m.amounts ,m.unit ,m.texture,m.depositoryCode,m.number_of_temporary,m.shelfLife,m.producedDate,m.productionPlace,m.brand,m.remark
</sql>
<!-- 表查询字段,包括物料类型 -->
<sql id="allColumnsAndTypeName">
id,depository_id,mname,quantity,price,type_id,state,code ,version ,amounts ,unit ,texture,tname,depositoryCode,dname,producedDate,shelfLife,productionPlace,brand,remark
</sql>
<!-- 表查询字段,包括物料类型 用于视图-->
<sql id="allColumnsAndTypeNameOnView">
id,depository_id,mname,quantity,price,type_id,state,tname,dname,version,amounts ,unit ,texture,code,depositoryCode,producedDate,shelfLife,productionPlace,brand,remark
</sql>
<!-- 表查询字段,用于查询物料与条形码视图-->
<sql id="materialAndBarCode">
id,bmcode,mcode,mid,depositoryId,mname,mtid,version,texture,unit,tname,price
</sql>
<!-- 查询所有数据的条数 -->
<select id="findCount" resultType="integer">
SELECT
count(*)
FROM material m
where m.depository_id is null
</select>
<!-- 查询所有符合条件的数据条数 -->
<select id="findCountByCondition" parameterType="map" resultType="integer">
SELECT
count(*)
FROM material m WHERE 1 = 1
<if test="depositoryId != null">
AND m.depository_id = #{depositoryId}
</if>
<if test="mname != null and mname != ''">
AND m.mname LIKE CONCAT('%', #{mname}, '%')
</if>
<if test="quantity != null">
AND m.quantity = #{quantity}
</if>
<if test="price != null">
AND m.price = #{price}
</if>
<if test="materialTypeId != null">
AND m.type_id = #{materialTypeId}
</if>
<if test="code != null and code != '' ">
and m.code = #{code}
</if>
<if test="shelfLife != null">
and #{shelfLife} >= shelfLife
</if>
<if test="producedDate != null">
and producedDate >= #{producedDate}
</if>
<if test="productionPlace != null and productionPlace !=''">
and productionPlace = #{productionPlace}
</if>
<if test="brand != '' and brand != null">
and brand = #{brand}
</if>
<if test="remark != '' and remark != null">
and remark = #{remark}
</if>
and state != 3 and m.depository_id is null
</select>
<!-- 根据条件参数查询数据列表 -->
<select id="findMaterialByCondition" resultMap="materialMap" parameterType="map">
SELECT
<include refid="allColumnsAndTypeNameOnView" />
from findMaterial
where 1 = 1
<if test="mid != null">
and id = #{mid}
</if>
<if test="depositoryId != null">
AND depository_id = #{depositoryId}
</if>
<if test="mname != null and mname != ''">
AND mname LIKE CONCAT('%', #{mname}, '%')
</if>
<if test="quantity != null">
AND quantity = #{quantity}
</if>
<if test="price != null">
AND price = #{price}
</if>
<if test="materialTypeId != null">
AND type_id = #{materialTypeId}
</if>
<if test="state != null and state != ''">
And state = #{state}
</if>
<if test="code != null and code != '' ">
and code = #{code}
</if>
<if test="shelfLife != null">
and #{shelfLife} >= shelfLife
</if>
<if test="producedDate != null">
and producedDate >= #{producedDate}
</if>
<if test="productionPlace != null and productionPlace !=''">
and productionPlace = #{productionPlace}
</if>
<if test="brand != '' and brand != null">
and brand LIKE CONCAT('%', #{brand}, '%')
</if>
<if test="remark != '' and remark != null">
and remark LIKE CONCAT('%', #{remark}, '%')
</if>
and depository_id is null
<if test="begin != null and size != null">
LIMIT #{begin},#{size}
</if>
</select>
<!--根据条件查询库存-->
<select id="findInventory" resultMap="materialMap" parameterType="map">
SELECT
<include refid="allColumnsAndTypeNameOnView" />
from findMaterial
where 1 = 1
<if test="mid != null">
and id = #{mid}
</if>
<if test="depositoryId != null">
AND depository_id = #{depositoryId}
</if>
<if test="mname != null and mname != ''">
AND mname LIKE CONCAT('%', #{mname}, '%')
</if>
<if test="quantity != null">
AND quantity = #{quantity}
</if>
<if test="price != null">
AND price = #{price}
</if>
<if test="materialTypeId != null">
AND type_id = #{materialTypeId}
</if>
<if test="state != null and state != ''">
And state = #{state}
</if>
<if test="code != null and code != '' ">
and code = #{code}
</if>
<if test="shelfLife != null">
and #{shelfLife} >= shelfLife
</if>
<if test="producedDate != null">
and producedDate >= #{producedDate}
</if>
<if test="productionPlace != null and productionPlace !=''">
and productionPlace = #{productionPlace}
</if>
<if test="brand != '' and brand != null">
and brand LIKE CONCAT('%', #{brand}, '%')
</if>
<if test="remark != '' and remark != null">
and remark LIKE CONCAT('%', #{remark}, '%')
</if>
and depository_id is not null
<if test="begin != null and size != null">
LIMIT #{begin},#{size}
</if>
</select>
<!--根据条件查询库存数量-->
<select id="findInventoryCount" parameterType="map" resultType="int">
SELECT
count(*)
from findMaterial
where 1 = 1
<if test="mid != null">
and id = #{mid}
</if>
<if test="depositoryId != null">
AND depository_id = #{depositoryId}
</if>
<if test="mname != null and mname != ''">
AND mname LIKE CONCAT('%', #{mname}, '%')
</if>
<if test="quantity != null">
AND quantity = #{quantity}
</if>
<if test="price != null">
AND price = #{price}
</if>
<if test="materialTypeId != null">
AND type_id = #{materialTypeId}
</if>
<if test="state != null and state != ''">
And state = #{state}
</if>
<if test="code != null and code != '' ">
and code = #{code}
</if>
<if test="shelfLife != null">
and #{shelfLife} >= shelfLife
</if>
<if test="producedDate != null">
and producedDate >= #{producedDate}
</if>
<if test="productionPlace != null and productionPlace !=''">
and productionPlace = #{productionPlace}
</if>
<if test="brand != '' and brand != null">
and brand LIKE CONCAT('%', #{brand}, '%')
</if>
<if test="remark != '' and remark != null">
and remark LIKE CONCAT('%', #{remark}, '%')
</if>
and depository_id is not null
</select>
<!-- 根据仓库查询物料-->
<select id="findMaterialByDepositorys" resultMap="materialMap" parameterType="list">
SELECT
<include refid="allColumns" />
from material m
where m.depository_id in
<foreach collection="list" index="index" item="item" open="("
separator="," close=")">
#{item}
</foreach>
</select>
<select id="findMaterialByTypeIds" resultMap="materialMap" parameterType="list">
SELECT
<include refid="allColumns" />
from material m
where m.type_id in
<foreach collection="list" index="index" item="item" open="("
separator="," close=")">
#{item}
</foreach>
and state = 1;
</select>
<select id="findMaterialByDepositorysAndType" resultMap="materialMap" parameterType="map">
SELECT
<include refid="allColumns" />
from material m
where m.depository_id in
<foreach collection="list" index="index" item="item" open="("
separator="," close=")">
#{item}
</foreach>
and m.type_id = #{materialTypeId}
</select>
<!-- 根据条形码查询物料-->
<select id="findMaterialByBarCodeByCondition" resultMap="BarCodeAndMaterialMap" parameterType="map">
select
<include refid="materialAndBarCode" />
from materialandbarcode
where 1 = 1
<if test="barCode != null and barCode != ''">
and bmcode = #{barCode}
</if>
<if test="mcode != null and mcode != ''">
and mcode = #{mcode}
</if>
<if test="mid != null">
and mid = #{mid}
</if>
<if test="id != null and id != ''">
and id = #{id}
</if>
<if test="depositoryId != null and depositoryId != ''">
and depositoryId = #{depositoryId}
</if>
<if test="mname != null and mname != ''">
AND mname LIKE CONCAT('%', #{mname}, '%')
</if>
<if test="typeId != null">
and mtid = #{typeId}
</if>
<if test="tname != null and tname != ''">
AND tname LIKE CONCAT('%', #{tname}, '%')
</if>
<if test="shelfLife != null">
and #{shelfLife} >= shelfLife
</if>
<if test="producedDate != null">
and producedDate >= #{producedDate}
</if>
<if test="productionPlace != null and productionPlace !=''">
and productionPlace = #{productionPlace}
</if>
<if test="brand != '' and brand != null">
and brand LIKE CONCAT('%', #{brand}, '%')
</if>
<if test="remark != '' and remark != null">
and remark LIKE CONCAT('%', #{remark}, '%')
</if>
group by bmcode
</select>
<select id="findMaterialByBarCodeCountByCondition" resultType="int" parameterType="map">
select count(*)
from barcodeandmaterial
where 1 = 1
<if test="barCode != null and barCode != ''">
and barCode = #{barCode}
</if>
<if test="mcode != null and mcode != ''">
and mcode = #{mcode}
</if>
</select>
<!-- 根据仓库查询物料-->
<select id="findMaterialByDepository" resultMap="materialMap" parameterType="map">
SELECT
<include refid="allColumns" />
from material m
where m.depository_id = #{depositoryId}
<if test="begin != null and size != null">
LIMIT #{begin},#{size}
</if>
</select>
<!-- 根据仓库查询物料总数-->
<select id="findMaterialByDepositoryCount" resultType="int" parameterType="map">
SELECT
COUNT(*)
from material m
where m.depository_id = #{depositoryId}
</select>
<!-- 根据主键查询数据 -->
<select id="findMaterialById" resultMap="materialMap" parameterType="integer">
SELECT
<include refid="allColumns" />
FROM material m WHERE m.id =#{id}
</select>
<select id="findMaterialAndTypeById" resultMap="materialAndTypeMap" parameterType="integer">
select
<include refid="allColumnsAndTypeName"/>
from materialAndType
where id = #{id}
</select>
<select id="findMaterialByType" resultMap="materialMap" parameterType="long">
select
<include refid="allColumns"/>
from material m
where m.type_id = #{oldId}
</select>
<!-- 根据主键查询数据 -->
<select id="findMaterialByIds" resultMap="materialMap" parameterType="list">
SELECT
<include refid="allColumns" />
FROM material m WHERE m.id IN
<foreach collection="ids" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</select>
<!-- 插入数据 -->
<insert id="insertMaterial" useGeneratedKeys="true" keyProperty="id">
INSERT INTO material (
id, depository_id, mname, quantity, price, type_id,code,unit,version,texture,amounts,depositoryCode,producedDate,shelfLife,brand,productionPlace,remark
) VALUES (
#{id},
<if test="depositoryId != null">
#{depositoryId},
</if>
<if test="depositoryId == null">
null,
</if>
#{mname},
<if test="quantity != null">
#{quantity},
</if>
<if test="quantity == null">
0,
</if>
<if test="price != null">
#{price},
</if>
<if test="price == null">
0,
</if>
#{materialTypeId},
#{code},
#{unit},
#{version},
#{texture},
<if test="amounts != null">
#{amounts},
</if>
<if test="amounts == null">
0,
</if>
<if test="depositoryCode != null">
#{depositoryCode},
</if>
<if test="depositoryCode == null">
'',
</if>
#{producedDate},
#{shelfLife},
#{brand},
#{productionPlace},
#{remark}
)
</insert>
<insert id="addBarCodeAndMcode" parameterType="map">
insert into barcodeandmaterial(id,barCode,mcode)
values (
#{id},
#{barCode},
#{code}
)
</insert>
<insert id="addBarCodeAndMaterialForMoreOne" parameterType="map">
insert into barcodeandmaterial(id,mcode,barCode)
values
<foreach collection="list" index="index" item="item" separator=",">
(#{id},
#{code},
#{item})
</foreach>
</insert>
<!-- 批量插入数据-->
<insert id="insertMaterials" parameterType="list">
INSERT INTO material (
id, depository_id, mname, quantity, price, type_id,code,unit,version,texture,amounts,depositoryCode
) VALUES
<foreach collection="list" index="index" item="item" separator=",">
(
#{item.id},
#{item.depositoryId},
#{item.mname},
#{item.quantity},
#{item.price},
#{item.typeId},
#{item.code},
#{item.unit},
#{item.version},
#{item.texture},
#{item.amounts},
#{item.depositoryCode}
)
</foreach>
</insert>
<!-- 删除映射-->
<delete id="deleteBarCodeAndMaterial" parameterType="map">
delete
from barcodeandmaterial
where 1 = 1
<if test="barCode != null and barCode != ''">
and barCode = #{barCode}
</if>
<if test="mcode != null and mcode != ''">
and mcode = #{mcode}
</if>
<if test="id != null and id != ''">
and id = #{id}
</if>
</delete>
<!-- 修改数据 -->
<update id="updateMaterial">
UPDATE material
<set>
<if test="depositoryId != null">
depository_id = #{depositoryId},
</if>
<if test="mname != null">
mname = #{mname},
</if>
<if test="quantity != null">
quantity = #{quantity},
</if>
<if test="price != null">
price = #{price},
</if>
<if test="materialTypeId != null">
type_id = #{materialTypeId},
</if>
<if test="state != null and state != ''">
state = #{state},
</if>
<if test="amounts != null and amounts != ''">
amounts = #{amounts},
</if>
<if test="version != null and version != ''">
version = #{version},
</if>
<if test="code != null and code != ''">
code = #{code},
</if>
<if test="unit != null and unit != ''">
unit = #{unit},
</if>
<if test="depositoryCode != null and depositoryCode !=''">
depositoryCode = #{depositoryCode},
</if>
<if test="numberOfTemporary != null">
number_of_temporary = #{numberOfTemporary},
</if>
<if test="texture != null and texture != ''">
texture = #{texture},
</if>
<if test="shelfLife != null">
shelfLife = #{shelfLife},
</if>
<if test="producedDate != null">
producedDate = #{producedDate},
</if>
<if test="productionPlace != null and productionPlace !=''">
productionPlace = #{productionPlace},
</if>
<if test="brand != '' and brand != null">
brand = #{brand},
</if>
<if test="remark != '' and remark != null">
remark = #{remark}
</if>
</set>
WHERE id = #{id}
</update>
<!-- 根据仓库id和物料名称改变物料的数量 -->
<update id="changeMaterial" parameterType="map">
UPDATE material
<set>
<if test='state == "已入库"'>
<if test="price != null">
quantity = quantity+#{quantity},
</if>
<if test="price != null">
price = price + #{price}
</if>
</if>
<if test='state == "已出库"'>
<if test="price != null">
quantity = quantity - #{quantity},
</if>
<if test="price != null">
price = price - #{price}
</if>
</if>
</set>
WHERE
depository_id = #{depositoryId} and mname = #{mname},
</update>
<!-- 批量修改数据
<update id="updateMaterials" parameterType="list">
<foreach collection="list" index="index" item="item" separator=";">
UPDATE material
<set>
<if test="item.depositoryId != null">
depository_id = #{item.depositoryId},
</if>
<if test="item.mname != null">
mname = #{item.mname},
</if>
<if test="item.quantity != null">
quantity = #{item.quantity},
</if>
<if test="item.price != null">
price = #{item.price},
</if>
<if test="item.typeId != null">
type_id = #{item.typeId}
</if>
</set>
WHERE id = #{item.id}
</foreach>
</update>-->
<!-- 根据主键删除数据 -->
<delete id="deleteMaterialById" parameterType="int">
DELETE FROM material WHERE id = #{id}
</delete>
<!-- 根据主键批量删除数据
<delete id="deleteMaterialByIds" parameterType="list">
DELETE FROM material WHERE id IN
<foreach collection="list" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</delete>-->
<!-- 根据主键将状态改为删除-->
<update id="changeStateToDeletedById" parameterType="int">
UPDATE material
<set>
state = 3
</set>
WHERE id = #{id}
</update>
<update id="updateStateByParam" parameterType="map">
UPDATE material
<set>
state = #{state}
</set>
where id = #{id}
<if test="oldState != null">
and state = #{oldState}
</if>
and state != 3
</update>
<!-- 根据主键批量将状态改为删除-->
<update id="changeStateToDeletedByIds" parameterType="list">
update material
<set>
state = 3
</set>
where id in
<foreach collection="list" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</update>
</mapper>

260
target/classes/com/dreamchaser/depository_manage/mapper/MaterialTypeMapper.xml

@ -1,260 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!-- material_type -->
<mapper namespace="com.dreamchaser.depository_manage.mapper.MaterialTypeMapper">
<!-- This code was generated by TableGo tools, mark 1 begin. -->
<!-- 字段映射 -->
<resultMap id="materialTypeMap" type="com.dreamchaser.depository_manage.entity.MaterialType">
<id column="id" property="id" jdbcType="INTEGER" />
<result column="tname" property="tname" jdbcType="VARCHAR" />
<result column="introduce" property="introduce" jdbcType="VARCHAR" />
<result column="state" property="state" jdbcType="INTEGER"/>
<result column="parentId" property="parentId" jdbcType="INTEGER"/>
<result column="oldId" property="oldId" jdbcType="INTEGER"/>
</resultMap>
<!-- 表查询字段 -->
<sql id="allColumns">
mt.id, mt.tname, mt.introduce, mt.state,mt.parentId,mt.oldId
</sql>
<!-- This code was generated by TableGo tools, mark 2 end. -->
<!-- 查询所有数据 -->
<select id="findMaterialTypeAll" resultMap="materialTypeMap">
SELECT
<include refid="allColumns" />
FROM material_type mt
where mt.state != 3 and mt.state != 4
</select>
<!-- 查询所有顶级父类 -->
<select id="findMaterialTypeNoParent" resultMap="materialTypeMap">
select
<include refid="allColumns" />
FROM material_type mt
where mt.state != 3 and mt.state != 4 and mt.parentId = 0
</select>
<select id="findMaterialTypeCountByCondition" resultType="int" parameterType="map">
select count(*)
FROM material_type mt WHERE 1 = 1
<if test="tname != null and tname != ''">
AND mt.tname LIKE CONCAT('%', #{tname}, '%')
</if>
<if test="introduce != null and introduce != ''">
AND mt.introduce LIKE CONCAT('%', #{introduce}, '%')
</if>
<if test="state != null and state != ''" >
and mt.state = #{state}
</if>
<if test="parentId != null">
and mt.parentId = #{parentId}
</if>
<if test="oldId != null">
and mt.oldId = #{oldId}
</if>
and mt.state != 3 and mt.state != 4
</select>
<!-- 根据条件参数查询数据列表 -->
<select id="findMaterialTypeByCondition" resultMap="materialTypeMap" parameterType="map">
SELECT
<include refid="allColumns" />
FROM material_type mt WHERE 1 = 1
<if test="tname != null and tname != ''">
AND mt.tname LIKE CONCAT('%', #{tname}, '%')
</if>
<if test="introduce != null and introduce != ''">
AND mt.introduce LIKE CONCAT('%', #{introduce}, '%')
</if>
<if test="state != null and state != ''" >
and mt.state = #{state}
</if>
<if test="parentId != null">
and mt.parentId = #{parentId}
</if>
<if test="oldId != null">
and mt.oldId = #{oldId}
</if>
and mt.state != 3 and mt.state != 4
<if test="begin != null and size != null">
LIMIT #{begin},#{size}
</if>
</select>
<!-- 根据主键查询数据 -->
<select id="findMaterialTypeNameById" resultType="string" parameterType="integer">
SELECT
mt.tname
FROM material_type mt WHERE mt.id = #{id}
</select>
<!-- 根据物料类型id查询数据 -->
<select id="findMaterialTypeNameByOldId" resultType="string" parameterType="long">
SELECT
mt.tname
FROM material_type mt WHERE mt.oldId = #{oldId}
</select>
<!-- 根据父类查询数据 -->
<select id="findMaterialTypeByParent" resultMap="materialTypeMap" parameterType="long">
SELECT
<include refid="allColumns" />
FROM material_type mt
WHERE mt.parentId = #{parentId}
</select>
<!-- 根据主键批量获取数据 -->
<select id="findMaterialTypeByOldIds" resultMap="materialTypeMap" parameterType="list">
SELECT
<include refid="allColumns" />
FROM material_type mt
WHERE mt.oldId in
<foreach collection="list" index="index" item="item" open="("
separator="," close=")">
#{item}
</foreach>
</select>
<!-- 根据主键查询数据 -->
<select id="findMaterialTypeById" resultMap="materialTypeMap" parameterType="integer">
SELECT
<include refid="allColumns" />
FROM material_type mt WHERE mt.oldId = #{id} and mt.state != 3 and mt.state != 4
</select>
<!-- 根据主键查询数据 -->
<select id="findMaterialTypeByOldId" resultMap="materialTypeMap" parameterType="long">
SELECT
<include refid="allColumns" />
FROM material_type mt WHERE mt.oldId = #{oldId} and mt.state != 3 and mt.state != 4
</select>
<!-- 根据主键查询数据
<select id="findMaterialTypeByIds" resultMap="materialTypeMap" parameterType="list">
SELECT
<include refid="allColumns" />
FROM material_type mt WHERE mt.id IN
<foreach collection="list" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</select>-->
<!-- 插入数据 -->
<insert id="insertMaterialType" parameterType="map">
INSERT INTO material_type (
id, tname, introduce,parentId,oldId
) VALUES (
#{id},
#{tname},
#{introduce},
#{parentId},
#{oldId}
)
</insert>
<!-- 批量插入数据
<insert id="insertMaterialTypes" parameterType="list">
INSERT INTO material_type (
id, tname, introduce
) VALUES
<foreach collection="list" index="index" item="item" separator=",">
(
#{item.id},
#{item.tname},
#{item.introduce}
)
</foreach>
</insert>-->
<!-- 修改数据 -->
<update id="updateMaterialType" parameterType="map">
UPDATE material_type
<set>
<if test="tname != null">
tname = #{tname},
</if>
<if test="introduce != null">
introduce = #{introduce},
</if>
<if test="state != null">
state = #{state},
</if>
<if test="parentId != null">
parentId = #{parentId}
</if>
</set>
WHERE id = #{id}
</update>
<!-- 批量修改数据 -->
<update id="updateMaterialTypes" parameterType="list">
<foreach collection="list" index="index" item="item" separator=";">
UPDATE material_type
<set>
<if test="item.tname != null">
tname = #{item.tname},
</if>
<if test="item.introduce != null">
introduce = #{item.introduce}
</if>
<if test="state != null">
state = #{state}
</if>
<if test="parentId != null">
parentId = #{parentId}
</if>
</set>
WHERE id = #{item.id}
</foreach>
</update>
<!-- 根据主键删除数据 -->
<delete id="deleteMaterialTypeById" parameterType="int">
DELETE FROM material_type WHERE id = #{id}
</delete>
<!-- 根据主键批量删除数据-->
<delete id="deleteMaterialTypeByIds" parameterType="list">
DELETE FROM material_type WHERE id IN
<foreach collection="list" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<!-- 根据主键将状态改为删除-->
<update id="changeStateToDeletedById" parameterType="int">
update material_type
<set>
state = 3
</set>
where id = #{id}
</update>
<!-- 根据主键批量将状态改为删除-->
<update id="changeStateToDeletedByIds" parameterType="list">
update material_type
<set>
state = 3
</set>
where id in
<foreach collection="list" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</update>
<update id="updateStateByParam" parameterType="map">
update material_type
<set>
state = #{state}
</set>
where id = #{id}
<if test="oldState != null">
and state = #{oldState}
</if>
and state != 3 and state != 4
</update>
</mapper>

131
target/classes/com/dreamchaser/depository_manage/mapper/NoticeMapper.xml

@ -1,131 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!-- notice -->
<mapper namespace="com.dreamchaser.depository_manage.mapper.NoticeMapper">
<!-- This code was generated by TableGo tools, mark 1 begin. -->
<!-- 字段映射 -->
<resultMap id="noticeMap" type="com.dreamchaser.depository_manage.entity.Notice">
<id column="id" property="id" jdbcType="INTEGER" />
<result column="title" property="title" jdbcType="VARCHAR" />
<result column="content" property="content" jdbcType="VARCHAR" />
<result column="time" property="time" jdbcType="INTEGER" />
</resultMap>
<!-- 表查询字段 -->
<sql id="allColumns">
n.id, n.title, n.content, n.time
</sql>
<!-- 查询所有 -->
<select id="findNoticeAll" resultMap="noticeMap">
SELECT
<include refid="allColumns" />
FROM notice n
</select>
<!-- 根据条件参数查询列表 -->
<select id="findNoticeByCondition" resultMap="noticeMap" parameterType="map">
SELECT
<include refid="allColumns" />
FROM notice n WHERE 1 = 1
<if test="title != null and title != ''">
AND n.title LIKE CONCAT('%', #{title}, '%')
</if>
<if test="content != null and content != ''">
AND n.content LIKE CONCAT('%', #{content}, '%')
</if>
<if test="time != null">
AND n.time = #{time}
</if>
order by n.time DESC
<if test="begin != null and size != null">
LIMIT #{begin},#{size}
</if>
</select>
<!-- 根据主键查询信息 -->
<select id="findNoticeByIds" resultMap="noticeMap" parameterType="list">
SELECT
<include refid="allColumns" />
FROM notice n WHERE n.id IN
<foreach collection="list" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</select>
<!-- 新增信息 -->
<insert id="addNotice">
INSERT INTO notice (
title, content, time
) VALUES (
#{title},
#{content},
#{time}
)
</insert>
<!-- 批量新增信息 -->
<insert id="addNotices" parameterType="list">
INSERT INTO notice (
id, title, content, time
) VALUES
<foreach collection="list" index="index" item="item" separator=",">
(
#{item.id},
#{item.title},
#{item.content},
#{item.time}
)
</foreach>
</insert>
<!-- 修改信息 -->
<update id="updateNotice">
UPDATE notice
<set>
<if test="title != null">
title = #{title},
</if>
<if test="content != null">
content = #{content},
</if>
<if test="time != null">
time = #{time}
</if>
</set>
WHERE id = #{id}
</update>
<!-- 批量修改信息 -->
<update id="updateNotices" parameterType="list">
<foreach collection="list" index="index" item="item" separator=";">
UPDATE notice
<set>
<if test="item.title != null">
title = #{item.title},
</if>
<if test="item.content != null">
content = #{item.content},
</if>
<if test="item.time != null">
time = #{item.time}
</if>
</set>
WHERE id = #{item.id}
</foreach>
</update>
<!-- 根据主键删除 -->
<delete id="deleteNoticeById" parameterType="int">
DELETE FROM notice WHERE id = #{id}
</delete>
<!-- 根据主键批量删除 -->
<delete id="deleteNoticeByIds" parameterType="list">
DELETE FROM notice WHERE id IN
<foreach collection="list" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

316
target/classes/com/dreamchaser/depository_manage/mapper/PlaceMapper.xml

@ -1,316 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!-- notice -->
<mapper namespace="com.dreamchaser.depository_manage.mapper.PlaceMapper">
<!-- This code was generated by TableGo tools, mark 1 begin. -->
<!-- 字段映射 -->
<resultMap id="placeMap" type="com.dreamchaser.depository_manage.entity.Place">
<id column="id" property="id" jdbcType="INTEGER" />
<result column="x" property="x" jdbcType="INTEGER" />
<result column="y" property="y" jdbcType="INTEGER" />
<result column="z" property="z" jdbcType="INTEGER" />
<result column="mid" property="mid" jdbcType="INTEGER" />
<result column="did" property="did" jdbcType="INTEGER" />
<result column="code" property="code" jdbcType="VARCHAR" />
<result column="min" property="min" jdbcType="INTEGER" />
<result column="max" property="max" jdbcType="INTEGER" />
<result column="state" property="state" jdbcType="INTEGER" />
<result column="quantity" property="quantity" jdbcType="INTEGER" />
</resultMap>
<resultMap id="materialAndPlaceMap" type="com.dreamchaser.depository_manage.entity.MaterialAndPlace">
<id column="id" property="id" jdbcType="INTEGER" />
<result column="mid" property="mid" jdbcType="INTEGER" />
<result column="pid" property="pid" jdbcType="INTEGER" />
<result column="did" property="did" jdbcType="INTEGER" />
<result column="quantity" property="quantity" jdbcType="INTEGER" />
<result column="max" property="max" jdbcType="INTEGER" />
<result column="min" property="min" jdbcType="INTEGER" />
<result column="code" property="code" jdbcType="VARCHAR" />
</resultMap>
<!-- 表查询字段 -->
<sql id="allColumns">
p.id,p.x,p.y,p.z,p.code,p.mid,p.did,p.min,p.max,p.state,p.quantity
</sql>
<sql id="allColumnsByMaterialAndPlace">
mp.id,mp.mid,mp.pid,mp.quantity,p.code,p.max,p.min,p.did
</sql>
<!-- 查询所有 -->
<select id="findPlaceAll" resultMap="placeMap">
SELECT
<include refid="allColumns" />
FROM place p
where p.state != 3
</select>
<select id="findPlaceByMidAndDid" resultMap="placeMap" parameterType="map">
SELECT
<include refid="allColumns" />
from materialandplace mp left join place p on p.id = mp.pid
where 1 = 1
<if test="mid != null and mid != ''">
and mp.mid = #{mid}
</if>
<if test="did != null and did != ''">
and ( p.did = #{did} or p.did = 0)
</if>
</select>
<!-- 根据条件参数查询列表 -->
<select id="findPlaceByCondition" resultMap="placeMap" parameterType="map">
SELECT
<include refid="allColumns" />
FROM place p WHERE 1 = 1
<if test="id != null and id != ''">
and p.id = #{id}
</if>
<if test="x != null and x != ''">
AND p.x = #{x}
</if>
<if test="y != null and y != ''">
AND p.y = #{y}
</if>
<if test="z != null and z != ''">
AND p.z = #{z}
</if>
<if test="code != null and code != ''">
AND p.code LIKE CONCAT('%', #{code}, '%')
</if>
<if test="mid != null and mid != ''">
AND find_in_set(#{mid},p.mid)
</if>
<if test="did != null and did != ''">
AND p.did = #{did}
</if>
<if test="max != null and max != ''">
AND p.max = #{max}
</if>
<if test="min != null and min != ''">
AND p.min = #{min}
</if>
<if test="state != null and state != ''">
and p.state = #{state}
</if>
and p.state != 3
<if test="begin != null and size != null">
LIMIT #{begin},#{size}
</if>
</select>
<select id="findPlaceCountByCondition" parameterType="map" resultType="int">
SELECT
count(*)
FROM place p WHERE 1 = 1
<if test="id != null and id != ''">
and p.id = #{id}
</if>
<if test="x != null and x != ''">
AND p.x = #{x}
</if>
<if test="y != null and y != ''">
AND p.y = #{y}
</if>
<if test="code != null and code != ''">
AND p.code LIKE CONCAT('%', #{code}, '%')
</if>
<if test="z != null and z != ''">
AND p.z = #{z}
</if>
<if test="mid != null and mid != ''">
AND p.mid = #{mid}
</if>
<if test="did != null and did != ''">
AND p.did = #{did}
</if>
<if test="max != null and max != ''">
AND p.max = #{max}
</if>
<if test="min != null and min != ''">
AND p.min = #{min}
</if>
<if test="state != null and state != ''">
and p.state = #{state}
</if>
and p.state != 3
</select>
<select id="findPlaceByDid" parameterType="int" resultMap="placeMap">
SELECT
<include refid="allColumns" />
FROM place p WHERE 1 = 1 and p.did = #{did}
</select>
<select id="findPlaceByMid" parameterType="int" resultMap="placeMap">
SELECT
<include refid="allColumns" />
FROM materialandplace mp left join place p on p.id = mp.pid WHERE 1 = 1 and mp.mid = #{mid}
</select>
<select id="findQuantityByMidAndPid" parameterType="map" resultType="int">
select quantity
from materialandplace
where pid = #{pid} and mid = #{mid}
</select>
<!-- 根据主键查询信息 -->
<select id="findPlaceById" resultMap="placeMap" parameterType="int">
SELECT
<include refid="allColumns" />
FROM place p WHERE p.id = #{id}
</select>
<select id="findPlaceAndMaterialByPid" resultMap="materialAndPlaceMap" parameterType="int">
SELECT
<include refid="allColumnsByMaterialAndPlace" />
FROM materialandplace mp left join place p on p.id = mp.pid WHERE 1 = 1 and p.id = #{id}
</select>
<select id="findPlaceAndMaterialByMidAndPid" resultMap="materialAndPlaceMap" parameterType="map">
SELECT
<include refid="allColumnsByMaterialAndPlace" />
FROM materialandplace mp left join place p on p.id = mp.pid
where 1 = 1
<if test="mid != null">
and mp.mid = #{mid}
</if>
<if test="pid != null">
and mp.pid = #{pid}
</if>
</select>
<!-- 新增信息 -->
<insert id="InsertPlace">
INSERT INTO place (
id,x,y,z,code, mid,did,min,max,state,quantity
) VALUES (
#{id},
#{x},
#{y},
#{z},
#{code},
#{mid},
#{did},
#{min},
#{max},
#{state},
#{quantity}
)
</insert>
<insert id="addMaterialOnPlace">
insert into materialandplace(id,mid,pid,quantity)
values (
#{id},
#{mid},
#{pid},
#{quantity}
)
</insert>
<delete id="delMaterialOnPlace" parameterType="int">
DELETE FROM materialandplace WHERE id = #{id}
</delete>
<!-- 修改信息 -->
<update id="UpdatePlace">
UPDATE place
<set>
<if test="x != null">
x = #{x},
</if>
<if test="y != null">
y = #{y},
</if>
<if test="z != null">
z = #{z},
</if>
<if test="code != null">
code = #{code},
</if>
<if test="mid != null">
mid = #{mid},
</if>
<if test="did != null">
did = #{did},
</if>
<if test="min != null">
min = #{min},
</if>
<if test="max != null">
max = #{max},
</if>
<if test="state != null and state !=''">
state = #{state},
</if>
<if test="quantity != null">
quantity = #{quantity}
</if>
</set>
WHERE id = #{id}
</update>
<update id="updateMaterialAndPlace">
update materialandplace
<set>
<if test="mid != null">
mid = #{mid},
</if>
<if test="quantity != null">
quantity = #{quantity},
</if>
<if test="pid != null">
pid = #{pid}
</if>
</set>
where id = #{id}
</update>
<!-- 根据主键删除 -->
<delete id="DelPlace" parameterType="int">
DELETE FROM place WHERE id = #{id}
</delete>
<!-- 根据主键批量将状态改为删除-->
<update id="changeStateToDeletedByIds" parameterType="list">
update place
<set>
state = 3
</set>
where id in
<foreach collection="list" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</update>
<!-- 根据主键将状态改为删除-->
<update id="changeStateToDeletedById" parameterType="int">
UPDATE place
<set>
state = 3
</set>
WHERE id = #{id}
</update>
<!--获取当前仓库下的行-->
<select id="findPlaceXByDid" parameterType="int" resultType="int">
select DISTINCT x from place where did = #{did} and state != 3 ORDER BY x desc
</select>
<!--获取当前仓库下的列-->
<select id="findPlaceYByDid" parameterType="map" resultType="int">
select DISTINCT y from place where did = #{did} and x = #{x} and state != 3 ORDER BY y desc
</select>
<!--获取当前仓库下的ceng-->
<select id="findPlaceZByDid" parameterType="map" resultType="int">
select DISTINCT z from place where did = #{did} and x = #{x} and state != 3 ORDER BY z desc
</select>
</mapper>

143
target/classes/com/dreamchaser/depository_manage/mapper/QrCodeMapper.xml

@ -1,143 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!-- 产品信息记录(库存)(material) -->
<mapper namespace="com.dreamchaser.depository_manage.mapper.QrCodeMapper">
<!-- This code was generated by TableGo tools, mark 1 begin. -->
<!-- 条形码与物料对应-->
<resultMap id="QrCodeAndLocationMap" type="com.dreamchaser.depository_manage.entity.PidOrDidAndCode">
<id column="id" property="id" jdbcType="INTEGER" />
<result column="code" property="code" jdbcType="VARCHAR"/>
<result column="pid" property="pid" jdbcType="INTEGER"/>
<result column="flag" property="flag" jdbcType="INTEGER"/>
<result column="depositoryId" property="depositoryId" jdbcType="INTEGER"/>
</resultMap>
<!-- 表查询字段 -->
<sql id="allColumns">
pdac.id,pdac.code,pdac.pid,pdac.flag,pdac.depositoryId
</sql>
<select id="findLocationByCondition" resultType="map" resultMap="QrCodeAndLocationMap">
select
<include refid="allColumns"/>
from pidordidandcode pdac
where 1 = 1
<if test="id != null and id != ''">
and id = #{id}
</if>
<if test="pid != null">
and pid = #{pid}
</if>
<if test="depositoryId != null and depositoryId != ''">
and depositoryId = #{depositoryId}
</if>
<if test="flag != null and flag != ''">
and flag = #{flag}
</if>
<if test="qrCode != null and qrCode!=''">
and code = #{qrCode}
</if>
</select>
<insert id="addQrCodeAndMaterial" parameterType="map">
insert into qrcodeandmaterial(id,qrcode,mcode)
values (
#{id},
#{qrCode},
#{mcode}
)
</insert>
<insert id="addQrCodeAndMaterialForMoreOne" parameterType="map">
insert into qrcodeandmaterial(id,mcode,qrcode)
values
<foreach collection="list" index="index" item="item" separator=",">
(#{id},
#{code},
#{item})
</foreach>
</insert>
<select id="selectQrCodeByMcode" parameterType="string" resultType="string">
select qrcode
from qrcodeandmaterial
where mcode = #{mcode}
</select>
<select id="findMaterialCodeByQrCode" parameterType="string" resultType="string">
select mcode
from qrcodeandmaterial
where qrcode = #{qrcode}
</select>
<!-- 删除映射-->
<delete id="deleteQrCodeAndMaterial" parameterType="map">
delete
from qrcodeandmaterial
where 1 = 1
<if test="qrCode != null and qrCode != ''">
and qrcode = #{qrCode}
</if>
<if test="mcode != null and mcode != ''">
and mcode = #{mcode}
</if>
<if test="id != null and id != ''">
and id = #{id}
</if>
</delete>
<select id="selectQrCodeByDepositoryOrPlace" parameterType="map" resultType="string">
select code
from pidordidandcode
where 1 = 1
<if test="pid != null">
and pid = #{pid}
</if>
<if test="depositoryId != null and depositoryId != ''">
and depositoryId = #{depositoryId}
</if>
<if test="flag != null and flag != ''">
and flag = #{flag}
</if>
</select>
<insert id="addQrCodeByPidOrDid" parameterType="map">
insert into pidordidandcode(id,pid,depositoryId,flag,code)
values (
#{id},
#{pid},
#{depositoryId},
#{flag},
#{qrCode}
)
</insert>
<insert id="addQrCodeByPidOrDidForMoreOne" parameterType="map">
insert into pidordidandcode(id,pid,depositoryId,flag,code)
values
<foreach collection="list" index="index" item="item" separator=",">
( #{id},
#{pid},
#{depositoryId},
#{flag},
#{item})
</foreach>
</insert>
</mapper>

138
target/classes/com/dreamchaser/depository_manage/mapper/RoleMapper.xml

@ -1,138 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!-- user -->
<mapper namespace="com.dreamchaser.depository_manage.mapper.RoleMapper">
<!-- 字段映射(权限) -->
<resultMap id="roleMap" type="com.dreamchaser.depository_manage.entity.Role">
<id column="id" property="id" jdbcType="INTEGER" />
<result column="name" property="name" jdbcType="VARCHAR" />
</resultMap>
<!-- 权限映射-->
<resultMap id="postoruserroleMap" type="com.dreamchaser.depository_manage.entity.PostOrUserRole">
<id column="id" property="id" jdbcType="INTEGER" />
<result column="classes" property="classes" jdbcType="INTEGER" />
<result column="role" property="role" jdbcType="INTEGER" />
<result column="userid" property="userid" jdbcType="INTEGER" />
<result column="did" property="did" jdbcType="INTEGER" />
</resultMap>
<resultMap id="depositoryAndrole" type="com.dreamchaser.depository_manage.pojo.RoleAndDepository">
<result column="prid" property="id" jdbcType="INTEGER"/>
<result column="userId" property="userId" jdbcType="INTEGER"/>
<result column="roleName" property="roleName" jdbcType="VARCHAR"/>
<result column="depositoryName" property="depositoryName" jdbcType="VARCHAR"/>
<result column="depositoryAddress" property="depositoryAddress" jdbcType="VARCHAR"/>
<result column="depositoryIntroduce" property="depositoryIntroduce" jdbcType="VARCHAR"/>
<result column="depositoryState" property="depositoryState" jdbcType="VARCHAR"/>
<result column="did" property="depositoryId" jdbcType="VARCHAR"/>
<result column="depositoryCode" property="depositoryCode" jdbcType="VARCHAR"/>
<result column="classes" property="classes" jdbcType="INTEGER"/>
</resultMap>
<sql id="allColumns">
r.id,r.name
</sql>
<sql id="roleNameAnddepositoryName">
prid,userid as userId,name as roleName,dname as depositoryName,address as depositoryAddress ,introduce as depositoryIntroduce,state as depositoryState,did,classes,code as depositoryCode
</sql>
<select id="findAllRole" resultMap="roleMap">
select
<include refid="allColumns"/>
from role r
</select>
<update id="updateUserOrPostRoleAndDepository" parameterType="map">
update postoruserrole
<set>
<if test="authority != null and authority != ''">
role = #{authority},
</if>
<if test="depositoryId != null and depositoryId != ''">
did = #{depositoryId}
</if>
</set>
where userid = #{userid}
</update>
<update id="UpdateRoleAndDepositoryById" parameterType="map">
update postoruserrole
<set>
<if test="authority != null and authority != ''">
role = #{authority},
</if>
<if test="depositoryId != null and depositoryId != ''">
did = #{depositoryId},
</if>
<if test="classes != null and classes != ''">
classes = #{classes}
</if>
</set>
where id = #{roleId}
</update>
<insert id="addUserOrPostRoleAndDepository" parameterType="map">
INSERT INTO postoruserrole (
id, classes, role,userid,did
) VALUES (
#{id},
#{classes},
#{authority},
#{userid},
#{depositoryId}
)
</insert>
<select id="findDepositoryAndRole" parameterType="int" resultMap="depositoryAndrole">
select
<include refid="roleNameAnddepositoryName"/>
from userroleanddepository
where userid = #{userid}
</select>
<select id="findRoleByUid" parameterType="int" resultType="int">
select role from postoruserrole where userid = #{uid} and classes = 1
</select>
<select id="findUserIdByDid" parameterType="int" resultType="int">
select userid from postoruserrole where 1 = 1 and did = #{did}
</select>
<select id="findRoleAndDepositoryByCondition" parameterType="map" resultMap="depositoryAndrole">
select
<include refid="roleNameAnddepositoryName"/>
from userroleanddepository
where 1 = 1
<if test="depositoryId != null and depositoryId != ''">
and did = #{depositoryId}
</if>
<if test="userId != null and userId != ''">
and userId = #{userId}
</if>
<if test="classes != null and classes != ''">
and classes = #{classes}
</if>
</select>
<select id="findRoleAndDepositoryById" parameterType="int" resultMap="depositoryAndrole">
select
<include refid="roleNameAnddepositoryName"/>
from userroleanddepository
where prid = #{id}
</select>
<delete id="deleteRoleAndDepositoryById" parameterType="int">
delete from postoruserrole WHERE id = #{id}
</delete>
</mapper>

322
target/classes/com/dreamchaser/depository_manage/mapper/StockTakingMapper.xml

@ -1,322 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!-- notice -->
<mapper namespace="com.dreamchaser.depository_manage.mapper.StockTakingMapper">
<!-- This code was generated by TableGo tools, mark 1 begin. -->
<!-- 字段映射 -->
<resultMap id="StockTakingMap" type="com.dreamchaser.depository_manage.entity.StockTaking">
<id column="id" property="id" jdbcType="INTEGER" />
<result column="code" property="code" jdbcType="VARCHAR" />
<result column="depositoryId" property="depositoryId" jdbcType="INTEGER" />
<result column="placeId" property="placeId" jdbcType="INTEGER" />
<result column="state" property="state" jdbcType="INTEGER" />
<result column="departmentManagerState" property="departmentManagerState" jdbcType="INTEGER" />
<result column="crateTime" property="crateTime" jdbcType="INTEGER" />
<result column="completeTime" property="completeTime" jdbcType="INTEGER" />
<result column="reviewTime" property="reviewTime" jdbcType="INTEGER" />
<result column="originator" property="originator" jdbcType="INTEGER" />
<result column="departmentManager" property="departmentManager" jdbcType="VARCHAR" />
<result column="auditOpinion" property="auditOpinion" jdbcType="VARCHAR" />
</resultMap>
<resultMap id="StockTakingChildMap" type="com.dreamchaser.depository_manage.pojo.StockTakingChildP">
<id column="id" property="id" jdbcType="INTEGER" />
<result column="mid" property="mid" jdbcType="INTEGER" />
<result column="oldInventory" property="oldInventory" jdbcType="INTEGER" />
<result column="newInventory" property="newInventory" jdbcType="INTEGER" />
<result column="inventory" property="inventory" jdbcType="INTEGER" />
<result column="mainId" property="mainId" jdbcType="INTEGER" />
<result column="takingResult" property="takingResult" jdbcType="VARCHAR" />
<result column="mtexture" property="mtexture" jdbcType="VARCHAR" />
<result column="mversion" property="mversion" jdbcType="VARCHAR" />
<result column="munit" property="munit" jdbcType="VARCHAR" />
<result column="tname" property="tname" jdbcType="VARCHAR" />
<result column="mcode" property="mcode" jdbcType="VARCHAR" />
<result column="mname" property="mname" jdbcType="VARCHAR" />
<result column="mtId" property="mtId" jdbcType="INTEGER" />
</resultMap>
<!-- 表查询字段 -->
<sql id="StockTakingAllColumns">
st.id,st.code,st.depositoryId,st.placeId,st.departmentManager,st.state,st.createTime,st.originator,st.completeTime,st.reviewTime,st.auditOpinion,st.departmentManagerState
</sql>
<sql id="StockTakingChildPAllColumns">
id,mid,oldInventory,newInventory,inventory,mainId,takingResult,mname,mtId,tname,mcode,mversion,munit,mtexture
</sql>
<!-- 插入主表-->
<insert id="insertStockTaking" useGeneratedKeys="true" keyProperty="id">
INSERT INTO stocktaking (id,code,depositoryId,placeId,departmentManager,state,createTime,originator,departmentManagerState)
values (
#{id},
#{code},
#{depositoryId},
#{placeId},
#{departmentManager},
#{state},
#{createTime},
#{originator},
#{departmentManagerState}
)
</insert>
<!-- 插入子表-->
<insert id="insertStockTakingChild" useGeneratedKeys="true" keyProperty="id">
INSERT INTO stocktakingchild (id,mid,oldInventory,newInventory,takingResult,inventory,mainId)
values (
#{id},#{mid},#{oldInventory},#{newInventory},#{takingResult},#{inventory},#{mainId}
)
</insert>
<delete id="deleteStockTakingChild" parameterType="int">
delete from stocktakingchild where id = #{id}
</delete>
<delete id="deleteStockTakingChilds" parameterType="list">
delete from stocktakingchild
where id in
<foreach collection="list" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<delete id="deleteStockTaking" parameterType="int">
delete from stocktaking where id = #{id}
</delete>
<delete id="deleteStockTakings" parameterType="list">
delete from stocktaking
where id in
<foreach collection="list" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<update id="updateStockTaking">
update stocktaking
<set>
<if test="code != null and code != ''">
code = #{code},
</if>
<if test="depositoryId != null">
depositoryId = #{depositoryId},
</if>
<if test="placeId != null">
placeId = #{placeId},
</if>
<if test="departmentManager != null and departmentManager != ''">
departmentManager = #{departmentManager},
</if>
<if test="state != null and state != ''">
state = #{state},
</if>
<if test="departmentManagerState != null and departmentManagerState != ''">
departmentManagerState = #{departmentManagerState},
</if>
<if test="createTime != null and createTime != ''">
createTime = #{createTime},
</if>
<if test="originator != null and originator!=''">
originator = #{originator},
</if>
<if test="auditOpinion != null">
auditOpinion = #{auditOpinion},
</if>
<if test="completeTime != null and completeTime != ''">
completeTime = #{completeTime},
</if>
<if test="reviewTime != null and reviewTime != ''">
reviewTime = #{reviewTime}
</if>
</set>
where id = #{id}
</update>
<update id="updateStockTakingChild">
update stocktakingchild
<set>
<if test="mid != null and mid != ''">
mid = #{mid},
</if>
<if test="oldInventory != null">
oldInventory = #{oldInventory},
</if>
<if test="newInventory != null">
newInventory = #{newInventory},
</if>
<if test="takingResult != null and takingResult != ''">
takingResult = #{takingResult},
</if>
<if test="inventory != null">
inventory = #{inventory},
</if>
<if test="mainId != null and mainId != ''">
mainId = #{mainId}
</if>
</set>
where id = #{id}
</update>
<select id="selectStockTakingChildByMainId" parameterType="int" resultMap="StockTakingChildMap">
select
<include refid="StockTakingChildPAllColumns"/>
from stocktakingchildinfo
where mainId = #{mainId}
</select>
<select id="selectStockTakingChildByIds" parameterType="list" resultMap="StockTakingChildMap">
select
<include refid="StockTakingChildPAllColumns"/>
from stocktakingchildinfo
where id in
<foreach collection="list" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</select>
<select id="selectStockTakingByCondition" parameterType="map" resultMap="StockTakingMap">
select
<include refid="StockTakingAllColumns"/>
from stocktaking st
where 1 = 1
<if test="code != null and code != ''">
and st.code LIKE CONCAT('%', #{code}, '%')
</if>
<if test="depositoryId != null and depositoryId != ''">
and st.depositoryId = #{depositoryId}
</if>
<if test="placeId != null">
and st.placeId = #{placeId}
</if>
<if test="departmentManagerState != null and departmentManagerState != ''">
and st.departmentManagerState = #{departmentManagerState}
</if>
<if test="departmentManager != null and departmentManager != ''">
and FIND_IN_SET(#{departmentManager},st.departmentManager) != 0
</if>
<if test="originator != null and originator!=''">
and st.originator = #{originator}
</if>
</select>
<select id="selectStockTakingChildPByCondition" parameterType="map" resultMap="StockTakingChildMap">
select
<include refid="StockTakingChildPAllColumns"/>
from stocktakingchildinfo
where 1 = 1
<if test="mid != null and mid != ''">
and mid = #{mid}
</if>
<if test="oldInventory != null">
and oldInventory = #{oldInventory}
</if>
<if test="newInventory != null">
and newInventory = #{newInventory}
</if>
<if test="takingResult != null and takingResult != ''">
and takingResult = #{takingResult}
</if>
<if test="inventory != null">
and inventory = #{inventory}
</if>
<if test="mainId != null and mainId != ''">
and mainId = #{mainId}
</if>
<if test="mname != null and mname != ''">
and mname like CONCAT('%',#{mname},'%')
</if>
<if test="mtId != null">
and mtId = #{mtId}
</if>
<if test="mcode != null and mcode != ''">
and mcode = #{mcode}
</if>
<if test="mversion != null and mversion != ''">
and mversion = #{mversion}
</if>
<if test="munit != null and munit != ''">
and munit = #{munit}
</if>
<if test="mtexture != null and mtexture != ''">
and mtexture = #{mtexture}
</if>
</select>
<select id="selectStockTakingById" resultMap="StockTakingMap">
select
<include refid="StockTakingAllColumns"/>
from stocktaking st
where st.id = #{id}
</select>
<select id="selectStockTakingChildPById" resultMap="StockTakingChildMap">
select
<include refid="StockTakingChildPAllColumns"/>
from stocktakingchildinfo
where id = #{id}
</select>
<select id="findMyTask" parameterType="map" resultMap="StockTakingMap">
select
<include refid="StockTakingAllColumns"/>
from stocktaking st
where 1 = 1
<if test='isDone == "0"'>
and (state = 3 and departmentManagerState = 3 and FIND_IN_SET(#{userId},st.departmentManager) != 0 )
or (state = 3 and departmentManagerState != 3 and #{userId} = st.originator)
</if>
<if test='isDone == "1"'>
and (state != 3 and departmentManagerState != 3 and FIND_IN_SET(#{userId},st.departmentManager) != 0 )
or (state != 3 and departmentManagerState != 3 and #{userId} = st.originator)
</if>
<if test="begin != null and size != null">
LIMIT #{begin},#{size}
</if>
</select>
<select id="findMyTaskCount" parameterType="map" resultType="int">
SELECT
count(*)
from stocktaking st
where 1 = 1
<if test='isDone == "0"'>
and (state = 3 and departmentManagerState = 3 and FIND_IN_SET(#{userId},st.departmentManager) != 0 )
or (state = 3 and departmentManagerState != 3 and #{userId} = st.originator)
</if>
<if test='isDone == "1"'>
and (state != 3 and departmentManagerState != 3 and FIND_IN_SET(#{userId},st.departmentManager) != 0 )
or (state != 3 and departmentManagerState != 3 and #{userId} = st.originator)
</if>
</select>
<select id="findMyApply" parameterType="map" resultMap="StockTakingMap">
select
<include refid="StockTakingAllColumns"/>
from stocktaking st
where 1 = 1
and originator = #{userId}
<if test="begin != null and size != null">
LIMIT #{begin},#{size}
</if>
</select>
<select id="findMyApplyCount" parameterType="map" resultType="int">
SELECT
count(*)
from stocktaking st
where 1 = 1
and originator = #{userId}
</select>
</mapper>

153
target/classes/com/dreamchaser/depository_manage/mapper/TransferRecordMapper.xml

@ -1,153 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!-- transfer_record -->
<mapper namespace="com.dreamchaser.depository_manage.mapper.TransferRecordMapper">
<!-- This code was generated by TableGo tools, mark 1 begin. -->
<!-- 字段映射 -->
<resultMap id="transferRecordMap" type="com.dreamchaser.depository_manage.entity.TransferRecord">
<id column="id" property="id" jdbcType="INTEGER" />
<result column="from_id" property="fromId" jdbcType="INTEGER" />
<result column="to_id" property="toId" jdbcType="INTEGER" />
<result column="mid" property="mid" jdbcType="INTEGER" />
<result column="applicantTime" property="applicantTime" jdbcType="INTEGER" />
<result column="applicantId" property="applicantId" jdbcType="INTEGER" />
<result column="from_place_id" property="fromPlaceId" jdbcType="INTEGER" />
<result column="to_place_id" property="toPlaceId" jdbcType="INTEGER" />
</resultMap>
<!-- 表查询字段 -->
<sql id="allColumns">
tr.id, tr.from_id, tr.to_id,tr.mid,tr.applicantTime,tr.applicantId,tr.from_place_id,tr.to_place_id
</sql>
<!-- 查询所有
<select id="findTransferRecordAll" resultMap="transferRecordMap">
SELECT
<include refid="allColumns" />
FROM transfer_record tr
</select>-->
<!-- 根据条件参数查询列表-->
<select id="findTransferRecordByCondition" resultMap="transferRecordMap" parameterType="map">
SELECT
<include refid="allColumns" />
FROM transfer_record tr WHERE 1 = 1
<if test="fromId != null">
AND tr.from_id = #{fromId}
</if>
<if test="toId != null">
AND tr.to_id = #{toId}
</if>
<if test="mid != null">
and tr.mid = #{mid}
</if>
<if test="applicantTime != null">
and tr.applicantTime = #{applicantTime}
</if>
<if test="applicantId != null">
and tr.applicantId = #{applicantId}
</if>
<if test="fromPlaceId != null">
and tr.from_place_id = #{fromPlaceId}
</if>
<if test="toPlaceId != null">
and tr.to_place_id = #{toPlaceId}
</if>
</select>
<!-- 根据主键查询信息
<select id="findTransferRecordByIds" resultMap="transferRecordMap" parameterType="list">
SELECT
<include refid="allColumns" />
FROM transfer_record tr WHERE tr.id IN
<foreach collection="list" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</select>-->
<select id="findTransferRecordById" resultMap="transferRecordMap" parameterType="int">
SELECT
<include refid="allColumns" />
FROM transfer_record tr WHERE tr.id = #{id}
</select>
<!-- 新增信息 -->
<insert id="addTransferRecord" parameterType="map" useGeneratedKeys="true" keyProperty="id">
INSERT INTO transfer_record (
id, from_id, to_id,quantity,mid,applicantTime,applicantId,from_place_id,to_place_id
) VALUES (
#{id},
#{fromId},
#{toId},
#{quantity},
#{mid},
#{applicantTime},
#{applicantId},
#{fromPlaceId},
#{toPlaceId}
)
</insert>
<!-- 批量新增信息
<insert id="addTransferRecords" parameterType="list">
INSERT INTO transfer_record (
id, from_id, to_id
) VALUES
<foreach collection="list" index="index" item="item" separator=",">
(
#{item.id},
#{item.fromId},
#{item.toId}
)
</foreach>
</insert>-->
<!-- 修改信息
<update id="updateTransferRecord">
UPDATE transfer_record
<set>
<if test="fromId != null">
from_id = #{fromId},
</if>
<if test="toId != null">
to_id = #{toId}
</if>
</set>
WHERE id = #{id}
</update>-->
<!-- 批量修改信息
<update id="updateTransferRecords" parameterType="list">
<foreach collection="list" index="index" item="item" separator=";">
UPDATE transfer_record
<set>
<if test="item.fromId != null">
from_id = #{item.fromId},
</if>
<if test="item.toId != null">
to_id = #{item.toId}
</if>
</set>
WHERE id = #{item.id}
</foreach>
</update>-->
<!-- 根据主键删除
<delete id="deleteTransferRecordById" parameterType="int">
DELETE FROM transfer_record WHERE id = #{id}
</delete>-->
<!-- 根据主键批量删除
<delete id="deleteTransferRecordByIds" parameterType="list">
DELETE FROM transfer_record WHERE id IN
<foreach collection="list" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</delete>-->
</mapper>

385
target/classes/com/dreamchaser/depository_manage/mapper/UserMapper.xml

@ -1,385 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!-- user -->
<mapper namespace="com.dreamchaser.depository_manage.mapper.UserMapper">
<!-- 字段映射 -->
<resultMap id="userMap" type="com.dreamchaser.depository_manage.entity.User">
<id column="id" property="id" jdbcType="INTEGER" />
<result column="uname" property="uname" jdbcType="VARCHAR" />
<result column="authority" property="authority" jdbcType="VARCHAR" />
<result column="pwd" property="pwd" jdbcType="VARCHAR" />
<result column="sex" property="sex" jdbcType="VARCHAR" />
<result column="depository_id" property="depositoryId" jdbcType="INTEGER" />
<result column="entry_date" property="entryDate" jdbcType="TIMESTAMP" />
<result column="email" property="email" jdbcType="VARCHAR" />
<result column="phone" property="phone" jdbcType="VARCHAR" />
<result column="state" property="state" javaType="INTEGER"/>
</resultMap>
<!-- 字段映射(包括角色名)-->
<resultMap id="userMapWithRoleName" type="com.dreamchaser.depository_manage.entity.User">
<id column="id" property="id" jdbcType="INTEGER" />
<result column="state" property="state" javaType="INTEGER"/>
<result column="uname" property="uname" jdbcType="VARCHAR" />
<result column="authority" property="authority" jdbcType="VARCHAR" />
<result column="pwd" property="pwd" jdbcType="VARCHAR" />
<result column="sex" property="sex" jdbcType="VARCHAR" />
<result column="depository_id" property="depositoryId" jdbcType="INTEGER" />
<result column="entry_date" property="entryDate" jdbcType="TIMESTAMP" />
<result column="email" property="email" jdbcType="VARCHAR" />
<result column="phone" property="phone" jdbcType="VARCHAR" />
<association property="role" javaType="com.dreamchaser.depository_manage.entity.Role">
<id property="id" column="authority"/>
<result property="name" column="name"/>
</association>
</resultMap>
<!-- 表查询字段(不敏感信息) -->
<sql id="noSensitiveColumns">
u.id, u.uname, u.sex, u.entry_date
</sql>
<!-- 表查询字段 -->
<sql id="allColumns">
u.id, u.uname, u.authority, u.pwd, u.sex, u.depository_id, u.entry_date, u.email,
u.phone,u.state
</sql>
<sql id="ColumnsAndRoleName">
u.id, u.uname, r.name,r.id,u.authority, u.pwd, u.sex, u.depository_id, u.entry_date, u.email,
u.phone,u.state
</sql>
<!-- This code was generated by TableGo tools, mark 2 end. -->
<!-- 查询该表的行数 -->
<select id="findCount" resultType="integer">
SELECT
count(*)
FROM user u
</select>
<!-- 根据条件查询数据的数量 -->
<select id="findCountByCondition" resultType="integer" parameterType="map">
SELECT
count(*)
FROM user u WHERE 1 = 1
<if test="uname != null and uname != ''">
AND u.uname LIKE CONCAT('%', #{uname}, '%')
</if>
<if test="authority != null and authority != ''">
AND u.authority LIKE CONCAT('%', #{authority}, '%')
</if>
<if test="pwd != null and pwd != ''">
AND u.pwd LIKE CONCAT('%', #{pwd}, '%')
</if>
<if test="sex != null and sex != ''">
AND u.sex LIKE CONCAT('%', #{sex}, '%')
</if>
<if test="depositoryId != null">
AND u.depository_id = #{depositoryId}
</if>
<if test="entryDate != null">
AND u.entry_date = #{entryDate}
</if>
<if test="email != null and email != ''">
AND u.email LIKE CONCAT('%', #{email}, '%')
</if>
<if test="phone != null and phone != ''">
AND u.phone LIKE CONCAT('%', #{phone}, '%')
</if>
<if test="state != null and state != ''">
and u.state = #{state}
</if>
and u.state != 3
</select>
<!-- 查询所有数据 -->
<!-- <select id="findUserAll" resultMap="userMap">
SELECT
<include refid="allColumns" />
FROM user u
</select>-->
<!-- 根据id查询数据列表 -->
<select id="findUserNameById" resultType="string" parameterType="int">
SELECT
u.uname
FROM user u WHERE u.id=#{id}
</select>
<!-- 根据email查询数据列表 -->
<select id="findUserByEmail" resultMap="userMap" parameterType="string">
SELECT
<include refid="allColumns" />
FROM user u WHERE u.email LIKE CONCAT('%', #{email}, '%')
</select>
<!-- 根据条件参数查询数据列表 -->
<select id="findUsersByCondition" resultMap="userMapWithRoleName" parameterType="map">
SELECT
<include refid="ColumnsAndRoleName" />
FROM user u,role r WHERE 1 = 1
<if test="uname != null and uname != ''">
AND u.uname LIKE CONCAT('%', #{uname}, '%')
</if>
<if test="authority != null and authority != ''">
AND u.authority = #{authority}
</if>
<if test="pwd != null and pwd != ''">
AND u.pwd LIKE CONCAT('%', #{pwd}, '%')
</if>
<if test="sex != null and sex != ''">
AND u.sex LIKE CONCAT('%', #{sex}, '%')
</if>
<if test="depositoryId != null">
AND u.depository_id = #{depositoryId} or u.depository_id = 0
</if>
<if test="entryDate != null">
AND u.entry_date = #{entryDate}
</if>
<if test="email != null and email != ''">
AND u.email LIKE CONCAT('%', #{email}, '%')
</if>
<if test="phone != null and phone != ''">
AND u.phone LIKE CONCAT('%', #{phone}, '%')
</if>
<if test="state != null and state != ''">
And u.state = #{state}
</if>
and u.authority = r.id
and u.state != 3
<if test="begin != null and size != null">
LIMIT #{begin},#{size}
</if>
</select>
<!-- 根据条件参数查询数据列表 -->
<select id="findUserByCondition" resultMap="userMap" parameterType="map">
SELECT
<include refid="allColumns" />
FROM user u WHERE 1 = 1
<if test="uname != null and uname != ''">
AND u.uname LIKE CONCAT('%', #{uname}, '%')
</if>
<if test="authority != null and authority != ''">
AND u.authority LIKE CONCAT('%', #{authority}, '%')
</if>
<if test="pwd != null and pwd != ''">
AND u.pwd LIKE CONCAT('%', #{pwd}, '%')
</if>
<if test="sex != null and sex != ''">
AND u.sex LIKE CONCAT('%', #{sex}, '%')
</if>
<if test="depositoryId != null">
AND u.depository_id = #{depositoryId}
</if>
<if test="entryDate != null">
AND u.entry_date = #{entryDate}
</if>
<if test="email != null and email != ''">
AND u.email LIKE CONCAT('%', #{email}, '%')
</if>
<if test="phone != null and phone != ''">
AND u.phone LIKE CONCAT('%', #{phone}, '%')
</if>
<if test="state != null and state != ''">
and u.state = #{state}
</if>
and u.state != 3
</select>
<!-- 根据主键查询数据 -->
<select id="findUserById" resultMap="userMap" parameterType="integer">
SELECT
<include refid="allColumns" />
FROM user u WHERE u.id = #{id}
</select>
<!-- 根据主键查询数据
<select id="findUserByIds" resultMap="userMap" parameterType="list">
SELECT
<include refid="allColumns" />
FROM user u WHERE u.id IN
<foreach collection="list" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</select>-->
<!-- 插入数据 -->
<insert id="insertUser" parameterType="map">
INSERT INTO user (
id, uname, authority, pwd, sex, depository_id, entry_date, email,
phone
) VALUES (
#{id},
#{uname},
#{authority},
#{pwd},
#{sex},
#{depositoryId},
#{entryDate},
#{email},
#{phone}
)
</insert>
<!-- 批量插入数据
<insert id="insertUsers" parameterType="list">
INSERT INTO user (
id, uname, authority, pwd, sex, depository_id, entry_date, email,
phone
) VALUES
<foreach collection="list" index="index" item="item" separator=",">
(
#{item.id},
#{item.uname},
#{item.authority},
#{item.pwd},
#{item.sex},
#{item.depositoryId},
#{item.entryDate},
#{item.email},
#{item.phone}
)
</foreach>
</insert>-->
<!-- 修改不敏感数据(这里由于并未对手机号进行验证所以这个也是非敏感信息可以给用户自己修改) -->
<update id="updateUserNoSensitive" parameterType="map">
UPDATE user
<set>
<if test='uname != null and uname!=""'>
uname = #{uname},
</if>
<if test='sex != null and sex!=""'>
sex = #{sex},
</if>
<if test="entryDate != null and entryDate!=''">
entry_date = #{entryDate},
</if>
<if test="phone != null and phone !=''">
phone = #{phone}
</if>
</set>
WHERE id = #{id}
</update>
<!-- 修改数据 -->
<update id="updateUser" parameterType="map">
UPDATE user
<set>
<if test='uname != null and uname!=""'>
uname = #{uname},
</if>
<if test='authority != null and authority!=""'>
authority = #{authority},
</if>
<if test="pwd != null and pwd!=''">
pwd = #{pwd},
</if>
<if test='sex != null and sex!=""'>
sex = #{sex},
</if>
<if test="depositoryId != null and depository!=''">
depository_id = #{depositoryId},
</if>
<if test="entryDate != null and entryDate!=''">
entry_date = #{entryDate},
</if>
<if test="email != null and email != ''">
email = #{email},
</if>
<if test="phone != null and phone !=''">
phone = #{phone},
</if>
<if test="state != null and state != ''">
state = #{state}
</if>
</set>
WHERE id = #{id}
</update>
<!-- 批量修改数据
<update id="updateUsers" parameterType="list">
<foreach collection="list" index="index" item="item" separator=";">
UPDATE user
<set>
<if test="item.uname != null">
uname = #{item.uname},
</if>
<if test="item.authority != null">
authority = #{item.authority},
</if>
<if test="item.pwd != null">
pwd = #{item.pwd},
</if>
<if test="item.sex != null">
sex = #{item.sex},
</if>
<if test="item.depositoryId != null">
depository_id = #{item.depositoryId},
</if>
<if test="item.entryDate != null">
entry_date = #{item.entryDate},
</if>
<if test="item.email != null">
email = #{item.email},
</if>
<if test="item.phone != null">
phone = #{item.phone}
</if>
</set>
WHERE id = #{item.id}
</foreach>
</update>-->
<!-- 根据主键删除数据 -->
<delete id="deleteUserById" parameterType="integer">
DELETE FROM user WHERE id = #{id}
</delete>
<!-- 根据主键批量删除数据 -->
<delete id="deleteUserByIds" parameterType="list">
DELETE FROM user WHERE id IN
<!-- 单参数时,List对象只能为list,数组对象只能为array,多参数用map时,collection参数才为KeyName -->
<foreach collection="list" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
<!--根据主键将状态修改为删除-->
<update id="changeUserStateToDeleteById" parameterType="integer">
update user
<set>
state = 3
</set>
where id = #{id}
</update>
<!--根据主键批量将状态修改为删除-->
<update id="changeUserStateToDeleteByIds" parameterType="list">
update user
<set>
state = 3
</set>
where id in
<foreach collection="list" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</update>
<update id="updateUserPasswordById" parameterType="map">
update user
<set>
pwd = #{new_password}
</set>
where id = #{id}
</update>
<select id="FindUserRoleById" parameterType="int" resultType="string">
select name from userandrole ur left join role r on ur.rid = r.id where ur.uid = #{id}
</select>
<select id="FindDepositoryByUserId" parameterType="int" resultType="string">
select dname from depositoryanduserbyport where uid = #{id}
</select>
</mapper>

143
target/classes/com/dreamchaser/depository_manage/mapper/standingBookMapper.xml

@ -1,143 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!-- standing_book -->
<mapper namespace="mysql.standingBook">
<!-- This code was generated by TableGo tools, mark 1 begin. -->
<!-- 字段映射 -->
<resultMap id="standingBookMap" type="StandingBook">
<id column="id" property="id" jdbcType="INTEGER" />
<result column="type" property="type" jdbcType="INTEGER" />
<result column="quantity" property="quantity" jdbcType="INTEGER" />
<result column="price" property="price" jdbcType="INTEGER" />
<result column="material_name" property="materialName" jdbcType="VARCHAR" />
</resultMap>
<!-- This code was generated by TableGo tools, mark 1 end. -->
<!-- This code was generated by TableGo tools, mark 2 begin. -->
<!-- 表查询字段 -->
<sql id="allColumns">
sb.id, sb.type, sb.quantity, sb.price, sb.material_name
</sql>
<!-- This code was generated by TableGo tools, mark 2 end. -->
<!-- 查询所有数据 -->
<select id="findStandingBookAll" resultMap="standingBookMap">
SELECT
<include refid="allColumns" />
FROM standing_book sb
</select>
<!-- 根据条件参数查询数据列表 -->
<select id="findStandingBookByCondition" resultMap="standingBookMap" parameterType="map">
SELECT
<include refid="allColumns" />
FROM standing_book sb WHERE 1 = 1
<if test="type != null">
AND sb.type = #{type}
</if>
<if test="quantity != null">
AND sb.quantity = #{quantity}
</if>
<if test="price != null">
AND sb.price = #{price}
</if>
<if test="materialName != null and materialName != ''">
AND sb.material_name LIKE CONCAT('%', #{materialName}, '%')
</if>
</select>
<!-- 根据主键查询数据 -->
<select id="findStandingBookByIds" resultMap="standingBookMap" parameterType="list">
SELECT
<include refid="allColumns" />
FROM standing_book sb WHERE sb.id IN
<foreach collection="list" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</select>
<!-- 插入数据 -->
<insert id="insertStandingBook" parameterType="map">
INSERT INTO standing_book (
id, type, quantity, price, material_name
) VALUES (
#{id},
#{type},
#{quantity},
#{price},
#{materialName}
)
</insert>
<!-- 批量插入数据 -->
<insert id="insertStandingBooks" parameterType="list">
INSERT INTO standing_book (
id, type, quantity, price, material_name
) VALUES
<foreach collection="list" index="index" item="item" separator=",">
(
#{item.id},
#{item.type},
#{item.quantity},
#{item.price},
#{item.materialName}
)
</foreach>
</insert>
<!-- 修改数据 -->
<update id="updateStandingBook" parameterType="map">
UPDATE standing_book
<set>
<if test="type != null">
type = #{type},
</if>
<if test="quantity != null">
quantity = #{quantity},
</if>
<if test="price != null">
price = #{price},
</if>
<if test="materialName != null">
material_name = #{materialName}
</if>
</set>
WHERE id = #{id}
</update>
<!-- 批量修改数据 -->
<update id="updateStandingBooks" parameterType="list">
<foreach collection="list" index="index" item="item" separator=";">
UPDATE standing_book
<set>
<if test="item.type != null">
type = #{item.type},
</if>
<if test="item.quantity != null">
quantity = #{item.quantity},
</if>
<if test="item.price != null">
price = #{item.price},
</if>
<if test="item.materialName != null">
material_name = #{item.materialName}
</if>
</set>
WHERE id = #{item.id}
</foreach>
</update>
<!-- 根据主键删除数据 -->
<delete id="deleteStandingBookById" parameterType="int">
DELETE FROM standing_book WHERE id = #{id}
</delete>
<!-- 根据主键批量删除数据 -->
<delete id="deleteStandingBookByIds" parameterType="list">
DELETE FROM standing_book WHERE id IN
<foreach collection="list" index="index" item="id" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

155
target/classes/logback-spring.xml

@ -1,155 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration scan="true" scanPeriod="60 seconds" debug="false">
<include resource="org/springframework/boot/logging/logback/defaults.xml"/>
<!-- 应用名称-->
<property name="appName" value="Dreamchser"/>
<!-- 日志的存放目录-->
<!-- debug-->
<property name="DEBUG_LOG_FILE_NAME_PATTERN" value="logs/${appName}-debug.%d{yyyy-MM-dd}.%i.log"/>
<property name="INFO_LOG_FILE_NAME_PATTERN" value="logs/${appName}-info.%d{yyyy-MM-dd}.%i.log"/>
<property name="WARN_LOG_FILE_NAME_PATTERN" value="errlogs/${appName}-warn.%d{yyyy-MM-dd}.%i.log"/>
<property name="ERROR_LOG_FILE_NAME_PATTERN" value="errlogs/${appName}-error.%d{yyyy-MM-dd}.%i.log"/>
<!-- 日志格式 -->
<property name="CONSOLE_LOG_PATTERN"
value="%clr(%d{${LOG_DATEFORMAT_PATTERN:-yyyy-MM-dd HH:mm:ss.SSS}}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%c){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}"/>
<property name="FILE_LOG_PATTERN"
value="%d{${LOG_DATEFORMAT_PATTERN:-yyyy-MM-dd HH:mm:ss.SSS}} ${LOG_LEVEL_PATTERN:-%5p} ${PID:- } --- [%t] %c : %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}"/>
<!--输出到控制台-->
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>${CONSOLE_LOG_PATTERN}</pattern>
</encoder>
</appender>
<!--输出到DEBUG文件-->
<appender name="debug_file" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${DEBUG_LOG_FILE_NAME_PATTERN}</fileNamePattern>
<!-- 日志保留天数 -->
<maxHistory>30</maxHistory>
<!-- 日志文件上限大小,达到指定大小后删除旧的日志文件 -->
<totalSizeCap>2GB</totalSizeCap>
<!-- 每个日志文件的最大值 -->
<timeBasedFileNamingAndTriggeringPolicy
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>50MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>${FILE_LOG_PATTERN}</pattern>
</encoder>
<!-- 此日志文件只记录debug级别的 -->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>debug</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<!--输出到INFO文件-->
<appender name="info_file" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${INFO_LOG_FILE_NAME_PATTERN}</fileNamePattern>
<!-- 日志保留天数 -->
<maxHistory>7</maxHistory>
<!-- 日志文件上限大小,达到指定大小后删除旧的日志文件 -->
<totalSizeCap>1GB</totalSizeCap>
<!-- 每个日志文件的最大值 -->
<timeBasedFileNamingAndTriggeringPolicy
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>50MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>${FILE_LOG_PATTERN}</pattern>
</encoder>
<!-- 此日志文件只记录info级别的 -->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>info</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<!--输出到WARN文件-->
<appender name="warn_file" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${WARN_LOG_FILE_NAME_PATTERN}</fileNamePattern>
<!-- 日志保留天数 -->
<maxHistory>30</maxHistory>
<!-- 日志文件上限大小,达到指定大小后删除旧的日志文件 -->
<totalSizeCap>1GB</totalSizeCap>
<!-- 每个日志文件的最大值 -->
<timeBasedFileNamingAndTriggeringPolicy
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>10MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>${FILE_LOG_PATTERN}</pattern>
</encoder>
<!-- 此日志文件只记录warn级别的 -->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>warn</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<!--输出到ERROR文件-->
<appender name="error_file" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${ERROR_LOG_FILE_NAME_PATTERN}</fileNamePattern>
<!-- 日志保留天数 -->
<maxHistory>30</maxHistory>
<!-- 日志文件上限大小,达到指定大小后删除旧的日志文件 -->
<totalSizeCap>1GB</totalSizeCap>
<!-- 每个日志文件的最大值 -->
<timeBasedFileNamingAndTriggeringPolicy
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>10MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>${FILE_LOG_PATTERN}</pattern>
</encoder>
<!-- 此日志文件只记录error级别的 -->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>error</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<!-- region 根据不同的环境设置不同的日志输出级别 -->
<springProfile name="default,local,dev">
<root level="info">
<appender-ref ref="console"/>
</root>
<!-- <logger name="com.dreamchaser" level="debug"/>-->
</springProfile>
<springProfile name="prod,pre,test">
<root level="info">
<appender-ref ref="console"/>
<appender-ref ref="debug_file"/>
<appender-ref ref="info_file"/>
<appender-ref ref="warn_file"/>
<appender-ref ref="error_file"/>
</root>
<logger name="com.ibatis" level="DEBUG" />
<logger name="com.ibatis.common.jdbc.SimpleDataSource" level="DEBUG" />
<logger name="com.ibatis.common.jdbc.ScriptRunner" level="DEBUG" />
<logger name="com.ibatis.sqlmap.engine.impl.SqlMapClientDelegate" level="DEBUG" />
<logger name="java.sql.Connection" level="DEBUG" />
<logger name="java.sql.Statement" level="DEBUG" />
<logger name="java.sql.PreparedStatement" level="DEBUG" />
<logger name="java.sql.ResultSet" level="DEBUG" />
<logger name="com.dreamchaser.dream.depository_manage.mapper" level="DEBUG" />
<!-- <logger name="com.dreamchaser.mapper" level="debug"/>-->
</springProfile>
<!-- endregion -->
</configuration>

26
target/classes/redisson-config.yml

@ -1,26 +0,0 @@
#Redisson配置
singleServerConfig:
address: "redis://127.0.0.1:6379"
clientName: null
database: 7 #选择使用哪个数据库0~15
idleConnectionTimeout: 10000
pingTimeout: 1000
connectTimeout: 10000
timeout: 3000
retryAttempts: 3
retryInterval: 1500
reconnectionTimeout: 3000
failedAttempts: 3
subscriptionsPerConnection: 5
subscriptionConnectionMinimumIdleSize: 1
subscriptionConnectionPoolSize: 50
connectionMinimumIdleSize: 32
connectionPoolSize: 64
dnsMonitoringInterval: 5000
#dnsMonitoring: false
threads: 0
nettyThreads: 0
codec:
class: "org.redisson.codec.JsonJacksonCodec"
transportMode: "NIO"

4
target/classes/static/api/clear.json

@ -1,4 +0,0 @@
{
"code": 1,
"msg": "服务端清理缓存成功"
}

226
target/classes/static/api/init.json

@ -1,226 +0,0 @@
{
"homeInfo": {
"title": "首页",
"href": "/welcome"
},
"logoInfo": {
"title": "Repository",
"image": "static/images/logo.png",
"href": ""
},
"menuInfo": [
{
"title": "仓库信息概览",
"href": "/welcome",
"icon": "fa fa-tachometer",
"target": "_self",
"child": [
{
"title": "首页",
"href": "/welcome",
"icon": "fa fa-home",
"target": "_self"
}
]
},
{
"title": "仓库管理",
"icon": "fa fa-lemon-o",
"href": "",
"target": "_self",
"child": [
{
"title": "申请提交",
"icon": "fa fa-book",
"target": "_self",
"child": [
{
"title": "入库申请",
"href": "/application_in",
"icon": "layui-icon layui-icon-file-b",
"target": "_self"
},
{
"title": "出库申请",
"href": "/application_out",
"icon": "fa fa-file-text",
"target": "_self"
},
{
"title": "库存转移申请",
"href": "/application_transfer",
"icon": "fa fa-exchange",
"target": "_self"
}
]
},
{
"title": "入库管理",
"icon": "fa fa-mail-forward",
"target": "_self",
"child": [
{
"title": "入库查询",
"href": "/table_in",
"icon": "fa fa-th-list",
"target": "_self"
},
{
"title": "入库可视化",
"href": "/chart_in",
"icon": "fa fa-bar-chart",
"target": "_self"
},
{
"title": "入库可视化(测试)",
"href": "/chart_in_back",
"icon": "fa fa-bar-chart",
"target": "_self"
}
]
},
{
"title": "出库管理",
"icon": "fa fa-mail-reply",
"target": "_self",
"child": [
{
"title": "出库查询",
"href": "/table_out",
"icon": "fa fa-th-list",
"target": "_self"
},
{
"title": "出库可视化",
"href": "/chart_out",
"icon": "fa fa-pie-chart",
"target": "_self"
}
]
},
{
"title": "库存管理",
"icon": "fa fa-server",
"target": "_self",
"child": [
{
"title": "库存查询",
"href": "/table_stock",
"icon": "fa fa-th-list",
"target": "_self"
},
{
"title": "库存可视化",
"href": "/chart_stock",
"icon": "fa fa-area-chart",
"target": "_self"
}
]
},
{
"title": "仓库管理",
"icon": "fa fa-wrench",
"target": "_self",
"child": [
{
"title": "创建仓库",
"href": "/depository_add",
"icon": "layui-icon layui-icon-template-1",
"target": "_self"
},
{
"title": "仓库查询",
"href": "/depository-out",
"icon": "fa fa-th-list",
"target": "_self"
}
]
},
{
"title": "物料种类管理",
"icon": "fa fa-wrench",
"target": "_self",
"child": [
{
"title": "物料种类添加",
"href": "/materialType_add",
"icon": "layui-icon layui-icon-list",
"target": "_self"
},
{
"title": "物料种类查询",
"href": "/materialType_view",
"icon": "fa fa-th-list",
"target": "_self"
}
]
},
{
"title": "物料管理",
"icon": "fa fa-wrench",
"target": "_self",
"child": [
{
"title": "创建物料",
"href": "/material_add",
"icon": "layui-icon layui-icon-template-1",
"target": "_self"
},
{
"title": "物料查询",
"href": "/material_out",
"icon": "fa fa-th-list",
"target": "_self"
}
]
},
{
"title": "我的任务",
"icon": "fa fa-tasks",
"target": "_self",
"href": "/my_task"
},
{
"title": "我的申请",
"href": "/my_apply",
"icon": "fa fa-paper-plane",
"target": "_self"
}
]
},
{
"title": "辅助管理",
"icon": "fa fa-slideshare",
"href": "",
"target": "_self",
"child": [
{
"title": "人员管理",
"href": "/table_user",
"icon": "fa fa-group",
"target": ""
},
{
"title": "公告发布",
"href": "/notice_edit",
"icon": "fa fa-superpowers",
"target": "_self"
}
]
},
{
"title": "个人中心",
"href": "pages/error.html",
"icon": "fa fa-superpowers",
"target": "_self",
"child": [
{
"title": "个人信息",
"href": "/account_look",
"icon": "layui-icon layui-icon-friends",
"target": ""
}
]
}
]
}

220
target/classes/static/api/init_checker.json

@ -1,220 +0,0 @@
{
"homeInfo": {
"title": "首页",
"href": "/welcome"
},
"logoInfo": {
"title": "Repository",
"image": "static/images/logo.png",
"href": ""
},
"menuInfo": [
{
"title": "仓库信息概览",
"href": "/welcome",
"icon": "fa fa-tachometer",
"target": "_self",
"child": [
{
"title": "首页",
"href": "/welcome",
"icon": "fa fa-home",
"target": "_self"
}
]
},
{
"title": "仓库管理",
"icon": "fa fa-lemon-o",
"href": "",
"target": "_self",
"child": [
{
"title": "申请提交",
"icon": "fa fa-book",
"target": "_self",
"child": [
{
"title": "入库申请",
"href": "/application_in",
"icon": "layui-icon layui-icon-file-b",
"target": "_self"
},
{
"title": "出库申请",
"href": "/application_out",
"icon": "fa fa-file-text",
"target": "_self"
},
{
"title": "库存转移申请",
"href": "application_transfer",
"icon": "fa fa-exchange",
"target": "_self"
}
]
},
{
"title": "入库管理",
"icon": "fa fa-mail-forward",
"target": "_self",
"child": [
{
"title": "入库查询",
"href": "/table_in",
"icon": "fa fa-th-list",
"target": "_self"
},
{
"title": "入库可视化",
"href": "/chart_in",
"icon": "fa fa-bar-chart",
"target": "_self"
},
{
"title": "入库可视化(测试)",
"href": "/chart_in_back",
"icon": "fa fa-bar-chart",
"target": "_self"
}
]
},
{
"title": "出库管理",
"icon": "fa fa-mail-reply",
"target": "_self",
"child": [
{
"title": "出库查询",
"href": "/table_out",
"icon": "fa fa-th-list",
"target": "_self"
},
{
"title": "出库可视化",
"href": "/chart_out",
"icon": "fa fa-pie-chart",
"target": "_self"
}
]
},
{
"title": "库存管理",
"icon": "fa fa-server",
"target": "_self",
"child": [
{
"title": "库存查询",
"href": "/table_stock",
"icon": "fa fa-th-list",
"target": "_self"
},
{
"title": "库存可视化",
"href": "/chart_stock",
"icon": "fa fa-area-chart",
"target": "_self"
}
]
},
{
"title": "仓库管理",
"icon": "fa fa-wrench",
"target": "_self",
"child": [
{
"title": "创建仓库",
"href": "/depository_add",
"icon": "layui-icon layui-icon-template-1",
"target": "_self"
},
{
"title": "仓库查询",
"href": "/depository-out",
"icon": "fa fa-th-list",
"target": "_self"
}
]
},
{
"title": "物料种类管理",
"icon": "fa fa-wrench",
"target": "_self",
"child": [
{
"title": "物料种类添加",
"href": "/materialType_add",
"icon": "layui-icon layui-icon-list",
"target": "_self"
},
{
"title": "物料种类查询",
"href": "/materialType_view",
"icon": "fa fa-th-list",
"target": "_self"
}
]
},
{
"title": "物料管理",
"icon": "fa fa-wrench",
"target": "_self",
"child": [
{
"title": "创建物料",
"href": "/material_add",
"icon": "layui-icon layui-icon-template-1",
"target": "_self"
},
{
"title": "物料查询",
"href": "/material_out",
"icon": "fa fa-th-list",
"target": "_self"
}
]
},
{
"title": "我的任务",
"icon": "fa fa-tasks",
"target": "_self",
"href": "/my_task"
},
{
"title": "我的申请",
"href": "/my_apply",
"icon": "fa fa-paper-plane",
"target": "_self"
}
]
},
{
"title": "辅助管理",
"icon": "fa fa-slideshare",
"href": "",
"target": "_self",
"child": [
{
"title": "公告发布",
"href": "/notice_edit",
"icon": "fa fa-superpowers",
"target": "_self"
}
]
},
{
"title": "个人中心",
"href": "pages/error.html",
"icon": "fa fa-superpowers",
"target": "_self",
"child": [
{
"title": "个人信息",
"href": "/account_look",
"icon": "layui-icon layui-icon-friends",
"target": ""
}
]
}
]
}

226
target/classes/static/api/init_reviewer.json

@ -1,226 +0,0 @@
{
"homeInfo": {
"title": "首页",
"href": "/welcome"
},
"logoInfo": {
"title": "Repository",
"image": "static/images/logo.png",
"href": ""
},
"menuInfo": [
{
"title": "仓库信息概览",
"href": "/welcome",
"icon": "fa fa-tachometer",
"target": "_self",
"child": [
{
"title": "首页",
"href": "/welcome",
"icon": "fa fa-home",
"target": "_self"
}
]
},
{
"title": "仓库管理",
"icon": "fa fa-lemon-o",
"href": "",
"target": "_self",
"child": [
{
"title": "申请提交",
"icon": "fa fa-book",
"target": "_self",
"child": [
{
"title": "入库申请",
"href": "/application_in",
"icon": "layui-icon layui-icon-file-b",
"target": "_self"
},
{
"title": "出库申请",
"href": "/application_out",
"icon": "fa fa-file-text",
"target": "_self"
},
{
"title": "库存转移申请",
"href": "application_transfer",
"icon": "fa fa-exchange",
"target": "_self"
}
]
},
{
"title": "入库管理",
"icon": "fa fa-mail-forward",
"target": "_self",
"child": [
{
"title": "入库查询",
"href": "/table_in",
"icon": "fa fa-th-list",
"target": "_self"
},
{
"title": "入库可视化",
"href": "/chart_in",
"icon": "fa fa-bar-chart",
"target": "_self"
},
{
"title": "入库可视化(测试)",
"href": "/chart_in_back",
"icon": "fa fa-bar-chart",
"target": "_self"
}
]
},
{
"title": "出库管理",
"icon": "fa fa-mail-reply",
"target": "_self",
"child": [
{
"title": "出库查询",
"href": "/table_out",
"icon": "fa fa-th-list",
"target": "_self"
},
{
"title": "出库可视化",
"href": "/chart_out",
"icon": "fa fa-pie-chart",
"target": "_self"
}
]
},
{
"title": "库存管理",
"icon": "fa fa-server",
"target": "_self",
"child": [
{
"title": "库存查询",
"href": "/table_stock",
"icon": "fa fa-th-list",
"target": "_self"
},
{
"title": "库存可视化",
"href": "/chart_stock",
"icon": "fa fa-area-chart",
"target": "_self"
}
]
},
{
"title": "仓库管理",
"icon": "fa fa-wrench",
"target": "_self",
"child": [
{
"title": "创建仓库",
"href": "/depository_add",
"icon": "layui-icon layui-icon-template-1",
"target": "_self"
},
{
"title": "仓库查询",
"href": "/depository-out",
"icon": "fa fa-th-list",
"target": "_self"
}
]
},
{
"title": "物料种类管理",
"icon": "fa fa-wrench",
"target": "_self",
"child": [
{
"title": "物料种类添加",
"href": "/materialType_add",
"icon": "layui-icon layui-icon-list",
"target": "_self"
},
{
"title": "物料种类查询",
"href": "/materialType_view",
"icon": "fa fa-th-list",
"target": "_self"
}
]
},
{
"title": "物料管理",
"icon": "fa fa-wrench",
"target": "_self",
"child": [
{
"title": "创建物料",
"href": "/material_add",
"icon": "layui-icon layui-icon-template-1",
"target": "_self"
},
{
"title": "物料查询",
"href": "/material_out",
"icon": "fa fa-th-list",
"target": "_self"
}
]
},
{
"title": "我的任务",
"icon": "fa fa-tasks",
"target": "_self",
"href": "/my_task"
},
{
"title": "我的申请",
"href": "/my_apply",
"icon": "fa fa-paper-plane",
"target": "_self"
}
]
},
{
"title": "辅助管理",
"icon": "fa fa-slideshare",
"href": "",
"target": "_self",
"child": [
{
"title": "人员管理",
"href": "/table_user",
"icon": "fa fa-group",
"target": ""
},
{
"title": "公告发布",
"href": "/notice_edit",
"icon": "fa fa-superpowers",
"target": "_self"
}
]
},
{
"title": "个人中心",
"href": "pages/error.html",
"icon": "fa fa-superpowers",
"target": "_self",
"child": [
{
"title": "个人信息",
"href": "/account_look",
"icon": "layui-icon layui-icon-friends",
"target": ""
}
]
}
]
}

100
target/classes/static/api/init_user.json

@ -1,100 +0,0 @@
{
"homeInfo": {
"title": "首页",
"href": "/welcome"
},
"logoInfo": {
"title": "Repository",
"image": "static/images/logo.png",
"href": ""
},
"menuInfo": [
{
"title": "仓库信息概览",
"href": "/welcome",
"icon": "fa fa-tachometer",
"target": "_self",
"child": [
{
"title": "首页",
"href": "/welcome",
"icon": "fa fa-home",
"target": "_self"
}
]
},
{
"title": "仓库管理",
"icon": "fa fa-lemon-o",
"href": "",
"target": "_self",
"child": [
{
"title": "申请提交",
"icon": "fa fa-book",
"target": "_self",
"child": [
{
"title": "入库申请",
"href": "/application_in",
"icon": "layui-icon layui-icon-file-b",
"target": "_self"
},
{
"title": "出库申请",
"href": "/application_out",
"icon": "fa fa-file-text",
"target": "_self"
},
{
"title": "库存转移申请",
"href": "application_transfer",
"icon": "fa fa-exchange",
"target": "_self"
}
]
},
{
"title": "我的任务",
"icon": "fa fa-tasks",
"target": "_self",
"href": "/my_task"
},
{
"title": "我的申请",
"href": "/my_apply",
"icon": "fa fa-paper-plane",
"target": "_self"
}
]
},
{
"title": "辅助管理",
"icon": "fa fa-slideshare",
"href": "",
"target": "_self",
"child": [
{
"title": "公告发布",
"href": "/notice_edit",
"icon": "fa fa-superpowers",
"target": "_self"
}
]
},
{
"title": "个人中心",
"href": "pages/error.html",
"icon": "fa fa-superpowers",
"target": "_self",
"child": [
{
"title": "个人信息",
"href": "/account_look",
"icon": "layui-icon layui-icon-friends",
"target": ""
}
]
}
]
}

254
target/classes/static/api/menus.json

@ -1,254 +0,0 @@
{
"code": 0,
"msg": "",
"count": 19,
"data": [
{
"authorityId": 1,
"authorityName": "系统管理",
"orderNumber": 1,
"menuUrl": null,
"menuIcon": "layui-icon-set",
"createTime": "2018/06/29 11:05:41",
"authority": null,
"checked": 0,
"updateTime": "2018/07/13 09:13:42",
"isMenu": 0,
"parentId": -1
},
{
"authorityId": 2,
"authorityName": "用户管理",
"orderNumber": 2,
"menuUrl": "system/user",
"menuIcon": null,
"createTime": "2018/06/29 11:05:41",
"authority": null,
"checked": 0,
"updateTime": "2018/07/13 09:13:42",
"isMenu": 0,
"parentId": 1
},
{
"authorityId": 3,
"authorityName": "查询用户",
"orderNumber": 3,
"menuUrl": "",
"menuIcon": "",
"createTime": "2018/07/21 13:54:16",
"authority": "user:view",
"checked": 0,
"updateTime": "2018/07/21 13:54:16",
"isMenu": 1,
"parentId": 2
},
{
"authorityId": 4,
"authorityName": "添加用户",
"orderNumber": 4,
"menuUrl": null,
"menuIcon": null,
"createTime": "2018/06/29 11:05:41",
"authority": "user:add",
"checked": 0,
"updateTime": "2018/07/13 09:13:42",
"isMenu": 1,
"parentId": 2
},
{
"authorityId": 5,
"authorityName": "修改用户",
"orderNumber": 5,
"menuUrl": null,
"menuIcon": null,
"createTime": "2018/06/29 11:05:41",
"authority": "user:edit",
"checked": 0,
"updateTime": "2018/07/13 09:13:42",
"isMenu": 1,
"parentId": 2
},
{
"authorityId": 6,
"authorityName": "删除用户",
"orderNumber": 6,
"menuUrl": null,
"menuIcon": null,
"createTime": "2018/06/29 11:05:41",
"authority": "user:delete",
"checked": 0,
"updateTime": "2018/07/13 09:13:42",
"isMenu": 1,
"parentId": 2
},
{
"authorityId": 7,
"authorityName": "角色管理",
"orderNumber": 7,
"menuUrl": "system/role",
"menuIcon": null,
"createTime": "2018/06/29 11:05:41",
"authority": null,
"checked": 0,
"updateTime": "2018/07/13 09:13:42",
"isMenu": 0,
"parentId": 1
},
{
"authorityId": 8,
"authorityName": "查询角色",
"orderNumber": 8,
"menuUrl": "",
"menuIcon": "",
"createTime": "2018/07/21 13:54:59",
"authority": "role:view",
"checked": 0,
"updateTime": "2018/07/21 13:54:58",
"isMenu": 1,
"parentId": 7
},
{
"authorityId": 9,
"authorityName": "添加角色",
"orderNumber": 9,
"menuUrl": "",
"menuIcon": "",
"createTime": "2018/06/29 11:05:41",
"authority": "role:add",
"checked": 0,
"updateTime": "2018/07/13 09:13:42",
"isMenu": 1,
"parentId": 7
},
{
"authorityId": 10,
"authorityName": "修改角色",
"orderNumber": 10,
"menuUrl": "",
"menuIcon": "",
"createTime": "2018/06/29 11:05:41",
"authority": "role:edit",
"checked": 0,
"updateTime": "2018/07/13 09:13:42",
"isMenu": 1,
"parentId": 7
},
{
"authorityId": 11,
"authorityName": "删除角色",
"orderNumber": 11,
"menuUrl": "",
"menuIcon": "",
"createTime": "2018/06/29 11:05:41",
"authority": "role:delete",
"checked": 0,
"updateTime": "2018/07/13 09:13:42",
"isMenu": 1,
"parentId": 7
},
{
"authorityId": 12,
"authorityName": "角色权限管理",
"orderNumber": 12,
"menuUrl": "",
"menuIcon": "",
"createTime": "2018/06/29 11:05:41",
"authority": "role:auth",
"checked": 0,
"updateTime": "2018/07/13 15:27:18",
"isMenu": 1,
"parentId": 7
},
{
"authorityId": 13,
"authorityName": "权限管理",
"orderNumber": 13,
"menuUrl": "system/authorities",
"menuIcon": null,
"createTime": "2018/06/29 11:05:41",
"authority": null,
"checked": 0,
"updateTime": "2018/07/13 15:45:13",
"isMenu": 0,
"parentId": 1
},
{
"authorityId": 14,
"authorityName": "查询权限",
"orderNumber": 14,
"menuUrl": "",
"menuIcon": "",
"createTime": "2018/07/21 13:55:57",
"authority": "authorities:view",
"checked": 0,
"updateTime": "2018/07/21 13:55:56",
"isMenu": 1,
"parentId": 13
},
{
"authorityId": 15,
"authorityName": "添加权限",
"orderNumber": 15,
"menuUrl": "",
"menuIcon": "",
"createTime": "2018/06/29 11:05:41",
"authority": "authorities:add",
"checked": 0,
"updateTime": "2018/06/29 11:05:41",
"isMenu": 1,
"parentId": 13
},
{
"authorityId": 16,
"authorityName": "修改权限",
"orderNumber": 16,
"menuUrl": "",
"menuIcon": "",
"createTime": "2018/07/13 09:13:42",
"authority": "authorities:edit",
"checked": 0,
"updateTime": "2018/07/13 09:13:42",
"isMenu": 1,
"parentId": 13
},
{
"authorityId": 17,
"authorityName": "删除权限",
"orderNumber": 17,
"menuUrl": "",
"menuIcon": "",
"createTime": "2018/06/29 11:05:41",
"authority": "authorities:delete",
"checked": 0,
"updateTime": "2018/06/29 11:05:41",
"isMenu": 1,
"parentId": 13
},
{
"authorityId": 18,
"authorityName": "登录日志",
"orderNumber": 18,
"menuUrl": "system/loginRecord",
"menuIcon": null,
"createTime": "2018/06/29 11:05:41",
"authority": null,
"checked": 0,
"updateTime": "2018/06/29 11:05:41",
"isMenu": 0,
"parentId": 1
},
{
"authorityId": 19,
"authorityName": "查询登录日志",
"orderNumber": 19,
"menuUrl": "",
"menuIcon": "",
"createTime": "2018/07/21 13:56:43",
"authority": "loginRecord:view",
"checked": 0,
"updateTime": "2018/07/21 13:56:43",
"isMenu": 1,
"parentId": 18
}
]
}

139
target/classes/static/api/table-in.json

@ -1,139 +0,0 @@
{
"code": 0,
"msg": "",
"count": 1000,
"data": [
{
"id": 10000,
"applicationId": 2001,
"materialName": "骁龙888芯片",
"depositoryName": "外芯仓库",
"quantity": "409",
"price": "205004109",
"type": "购入",
"state": "待审核",
"applicantName": "张三",
"reviewerName": "King",
"applyTime": "2020-10-06 10:05",
"reviewTime": "无",
"depositoryId": 57,
"applyRemarks": "老板要求今天这批货得进库,请尽快批准"
},
{
"id": 10001,
"applicationId": 3301,
"materialName": "麒麟980芯片",
"depositoryName": "外芯仓库",
"quantity": "409",
"price": "205004109",
"type": "购入",
"state": "已入库",
"applicantName": "张三",
"reviewerName": "King",
"applyTime": "2021-10-06 10:05",
"reviewRemarks": "审核批准!",
"reviewTime": "2021-10-07 11:12",
"depositoryId": 57,
"applyRemarks": "老板要求今天这批货得进库,请尽快批准",
"checkerName": "李四",
"checkRemarks": "验收无误,入库!",
"checkTime": "2021-10-8 15:23"
},
{
"id": 10002,
"applicationId": 409,
"materialName": "骁龙888芯片",
"depositoryName": "外芯仓库",
"quantity": "409",
"price": "205004109",
"type": "购入",
"state": "待审核",
"applicantName": "张三",
"reviewerName": "King",
"applyTime": "2020-10-06 10:05",
"reviewTime": "2020-10-07 11:12",
"depositoryId": 57,
"applyRemarks": "老板要求今天这批货得进库,请尽快批准"
},
{
"id": 10000,
"applicationId": 123,
"materialName": "骁龙888芯片",
"depositoryName": "外芯仓库",
"quantity": "409",
"price": "205004109",
"type": "转入",
"state": "待审核",
"applicantName": "张三",
"reviewerName": "King",
"applyTime": "2020-10-06 10:05",
"reviewTime": "2020-10-07 11:12",
"depositoryId": 57,
"applyRemarks": "老板要求今天这批货得进库,请尽快批准"
},
{
"id": 10000,
"applicationId": 321,
"materialName": "骁龙888芯片",
"depositoryName": "外芯仓库",
"quantity": "409",
"price": "205004109",
"type": "转入",
"state": "待审核",
"applicantName": "张三",
"reviewerName": "King",
"applyTime": "2020-10-06 10:05",
"reviewTime": "2020-10-07 11:12",
"depositoryId": 57,
"applyRemarks": "老板要求今天这批货得进库,请尽快批准"
},
{
"id": 10000,
"applicationId": 456,
"materialName": "骁龙888芯片",
"depositoryName": "外芯仓库",
"quantity": "409",
"price": "205004109",
"type": "转入",
"state": "待审核",
"applicantName": "张三",
"reviewerName": "King",
"applyTime": "2020-10-06 10:05",
"reviewTime": "2020-10-07 11:12",
"depositoryId": 57,
"applyRemarks": "老板要求今天这批货得进库,请尽快批准"
},
{
"id": 10000,
"applicationId": 456,
"materialName": "骁龙888芯片",
"depositoryName": "外芯仓库",
"quantity": "409",
"price": "205004109",
"type": "购入",
"state": "待审核",
"applicantName": "张三",
"reviewerName": "King",
"applyTime": "2020-10-06 10:05",
"reviewTime": "2020-10-07 11:12",
"depositoryId": 57,
"applyRemarks": "老板要求今天这批货得进库,请尽快批准"
},
{
"id": 10000,
"applicationId": 123,
"materialName": "骁龙888芯片",
"depositoryName": "外芯仓库",
"quantity": "409",
"price": "205004109",
"type": "转入",
"state": "待审核",
"applicantName": "张三",
"reviewerName": "King",
"applyTime": "2020-10-06 10:05",
"reviewTime": "2020-10-07 11:12",
"depositoryId": 57,
"applyRemarks": "老板要求今天这批货得进库,请尽快批准"
}
]
}

136
target/classes/static/api/table-out.json

@ -1,136 +0,0 @@
{
"code": 0,
"msg": "",
"count": 1000,
"data": [
{
"id": 10000,
"applicationId": 2001,
"materialName": "骁龙888芯片",
"depositoryName": "外芯仓库",
"quantity": "409",
"price": "205004109",
"type": "购入",
"state": "待审核",
"applicantName": "张三",
"reviewerName": "King",
"applyTime": "2020-10-06 10:05",
"reviewTime": "无",
"depositoryId": 57,
"applyRemarks": "老板要求今天这批货得进库,请尽快批准"
},
{
"id": 10001,
"applicationId": 3301,
"materialName": "麒麟980芯片",
"depositoryName": "外芯仓库",
"quantity": "409",
"price": "205004109",
"type": "购入",
"state": "已入库",
"applicantName": "张三",
"reviewerName": "King",
"applyTime": "2021-10-06 10:05",
"reviewRemarks": "审核批准!",
"reviewTime": "2021-10-07 11:12",
"depositoryId": 57,
"applyRemarks": "老板要求今天这批货得进库,请尽快批准"
},
{
"id": 10002,
"applicationId": 409,
"materialName": "骁龙888芯片",
"depositoryName": "外芯仓库",
"quantity": "409",
"price": "205004109",
"type": "购入",
"state": "待审核",
"applicantName": "张三",
"reviewerName": "King",
"applyTime": "2020-10-06 10:05",
"reviewTime": "2020-10-07 11:12",
"depositoryId": 57,
"applyRemarks": "老板要求今天这批货得进库,请尽快批准"
},
{
"id": 10000,
"applicationId": 123,
"materialName": "骁龙888芯片",
"depositoryName": "外芯仓库",
"quantity": "409",
"price": "205004109",
"type": "转入",
"state": "待审核",
"applicantName": "张三",
"reviewerName": "King",
"applyTime": "2020-10-06 10:05",
"reviewTime": "2020-10-07 11:12",
"depositoryId": 57,
"applyRemarks": "老板要求今天这批货得进库,请尽快批准"
},
{
"id": 10000,
"applicationId": 321,
"materialName": "骁龙888芯片",
"depositoryName": "外芯仓库",
"quantity": "409",
"price": "205004109",
"type": "转入",
"state": "待审核",
"applicantName": "张三",
"reviewerName": "King",
"applyTime": "2020-10-06 10:05",
"reviewTime": "2020-10-07 11:12",
"depositoryId": 57,
"applyRemarks": "老板要求今天这批货得进库,请尽快批准"
},
{
"id": 10000,
"applicationId": 456,
"materialName": "骁龙888芯片",
"depositoryName": "外芯仓库",
"quantity": "409",
"price": "205004109",
"type": "转入",
"state": "待审核",
"applicantName": "张三",
"reviewerName": "King",
"applyTime": "2020-10-06 10:05",
"reviewTime": "2020-10-07 11:12",
"depositoryId": 57,
"applyRemarks": "老板要求今天这批货得进库,请尽快批准"
},
{
"id": 10000,
"applicationId": 456,
"materialName": "骁龙888芯片",
"depositoryName": "外芯仓库",
"quantity": "409",
"price": "205004109",
"type": "购入",
"state": "待审核",
"applicantName": "张三",
"reviewerName": "King",
"applyTime": "2020-10-06 10:05",
"reviewTime": "2020-10-07 11:12",
"depositoryId": 57,
"applyRemarks": "老板要求今天这批货得进库,请尽快批准"
},
{
"id": 10000,
"applicationId": 123,
"materialName": "骁龙888芯片",
"depositoryName": "外芯仓库",
"quantity": "409",
"price": "205004109",
"type": "转入",
"state": "待审核",
"applicantName": "张三",
"reviewerName": "King",
"applyTime": "2020-10-06 10:05",
"reviewTime": "2020-10-07 11:12",
"depositoryId": 57,
"applyRemarks": "老板要求今天这批货得进库,请尽快批准"
}
]
}

95
target/classes/static/api/table-user.json

@ -1,95 +0,0 @@
{
"code": 0,
"msg": "",
"count": 1000,
"data": [
{
"id": 10000,
"uname": "张三",
"sex": "男",
"authority": "仓管员",
"phone": "4561348",
"email": "12345689@qq.com",
"depositoryName": "外芯仓库",
"entryDate": "2012-10-06",
"depositoryId": 1
},
{
"id": 10000,
"uname": "李四",
"sex": "男",
"authority": "仓管员",
"phone": "4561348",
"email": "12345689@qq.com",
"depositoryName": "义乌仓库a",
"entryDate": "2012-10-06",
"depositoryId": 1
},
{
"id": 10000,
"uname": "King",
"sex": "男",
"authority": "仓管员",
"phone": "4561348",
"email": "12345689@qq.com",
"depositoryName": "义乌仓库b",
"entryDate": "2012-10-06",
"depositoryId": 1
},
{
"id": 10000,
"uname": "张三",
"sex": "男",
"authority": "仓管员",
"phone": "4561348",
"email": "12345689@qq.com",
"depositoryName": "宁波仓库",
"entryDate": "2012-10-06",
"depositoryId": 1
},
{
"id": 10000,
"uname": "张三",
"sex": "男",
"authority": "仓管员",
"phone": "4561348",
"email": "12345689@qq.com",
"depositoryName": "宁波仓库",
"entryDate": "2012-10-06",
"depositoryId": 1
},
{
"id": 10000,
"uname": "boss",
"sex": "男",
"authority": "系统管理员",
"phone": "4561348",
"email": "12345689@qq.com",
"depositoryName": "all",
"entryDate": "2012-10-06",
"depositoryId": 1
},
{
"id": 10000,
"uname": "张三",
"sex": "男",
"authority": "仓管员",
"phone": "4561348",
"email": "12345689@qq.com",
"depositoryName": "外芯仓库",
"entryDate": "2012-10-06",
"depositoryId": 1
},
{
"id": 10000,
"uname": "张三",
"sex": "男",
"authority": "仓管员",
"phone": "4561348",
"email": "12345689@qq.com",
"depositoryName": "外芯仓库",
"entryDate": "2012-10-06",
"depositoryId": 1
}
]
}

87
target/classes/static/api/tableSelect.json

@ -1,87 +0,0 @@
{
"code": 0,
"msg": "",
"count": 16,
"data": [
{
"id": "001",
"username": "张玉林",
"sex": "女"
},
{
"id": "002",
"username": "刘晓军",
"sex": "男"
},
{
"id": "003",
"username": "张恒",
"sex": "男"
},
{
"id": "004",
"username": "朱一",
"sex": "男"
},
{
"id": "005",
"username": "刘佳能",
"sex": "女"
},
{
"id": "006",
"username": "晓梅",
"sex": "女"
},
{
"id": "007",
"username": "马冬梅",
"sex": "女"
},
{
"id": "008",
"username": "刘晓庆",
"sex": "女"
},
{
"id": "009",
"username": "刘晓庆",
"sex": "女"
},
{
"id": "010",
"username": "刘晓庆",
"sex": "女"
},
{
"id": "011",
"username": "刘晓庆",
"sex": "女"
},
{
"id": "012",
"username": "刘晓庆",
"sex": "女"
},
{
"id": "013",
"username": "刘晓庆",
"sex": "女"
},
{
"id": "014",
"username": "刘晓庆",
"sex": "女"
},
{
"id": "015",
"username": "刘晓庆",
"sex": "女"
},
{
"id": "016",
"username": "刘晓庆",
"sex": "女"
}
]
}

225
target/classes/static/api/test.json

@ -1,225 +0,0 @@
{
"homeInfo": {
"title": "首页",
"href": "/welcome"
},
"logoInfo": {
"title": "Repository",
"image": "static/images/logo.png",
"href": ""
},
"menuInfo": [
{
"icon": "fa fa-home",
"href": "/welcome",
"title": "仓库信息概览",
"target": "_self",
"child": [
{
"icon": "fa fa-home",
"href": "/welcome",
"title": "首页",
"target": "_self",
"child": []
}
]
},
{
"icon": "layui-icon layui-icon-template-1",
"href": "/account_look",
"title": "个人中心",
"target": "_self",
"child": []
},
{
"icon": "fa fa-lemon-o",
"href": "",
"title": "仓库管理",
"target": "_self",
"child": [
{
"icon": "layui-icon layui-icon-template-1",
"href": "/my_task",
"title": "我的任务",
"target": "_self",
"child": []
},
{
"icon": "layui-icon layui-icon-template-1",
"href": "/my_apply",
"title": "我的申请",
"target": "_self",
"child": []
},
{
"icon": "fa fa-mail-forward",
"href": "",
"title": "申请提交",
"target": "_self",
"child": [
{
"icon": "layui-icon layui-icon-file-b",
"href": "/application_in",
"title": "入库申请",
"target": "_self"
},
{
"icon": "fa fa-file-text",
"href": "/application_out",
"title": "出库申请",
"target": "_self"
},
{
"icon": "fa fa-exchange",
"href": "/application_transfer",
"title": "库存转移申请",
"target": "_self"
}
]
},
{
"icon": "fa fa-mail-forward",
"href": "",
"title": "入库管理",
"target": "_self",
"child": [
{
"icon": "fa fa-th-list",
"href": "/table_in",
"title": "入库查询",
"target": "_self"
},
{
"icon": "fa fa-bar-chart",
"href": "/chart_in",
"title": "入库可视化",
"target": "_self"
}
]
},
{
"icon": "fa fa-mail-forward",
"href": "",
"title": "出库管理",
"target": "_self",
"child": [
{
"icon": "fa fa-th-list",
"href": "/table_out",
"title": "出库查询",
"target": "_self"
},
{
"icon": "fa fa-pie-chart",
"href": "/chart_out",
"title": "出库可视化",
"target": "_self"
}
]
},
{
"icon": "fa fa-mail-forward",
"href": "",
"title": "库存管理",
"target": "_self",
"child": [
{
"icon": "fa fa-th-list",
"href": "/table_stock",
"title": "库存查询",
"target": "_self"
},
{
"icon": "fa fa-area-chart",
"href": "/chart_stock",
"title": "库存可视化",
"target": "_self"
}
]
},
{
"icon": "fa fa-mail-forward",
"href": "",
"title": "仓库管理",
"target": "_self",
"child": [
{
"icon": "layui-icon layui-icon-template-1",
"href": "/depository_add",
"title": "创建仓库",
"target": "_self"
},
{
"icon": "fa fa-th-list",
"href": "/depository-out",
"title": "仓库查询",
"target": "_self"
}
]
},
{
"icon": "fa fa-mail-forward",
"href": "",
"title": "物料种类管理",
"target": "_self",
"child": [
{
"icon": "fa fa-th-list",
"href": "/materialType_add",
"title": "物料种类添加",
"target": "_self"
},
{
"icon": "layui-icon layui-icon-template-1",
"href": "/materialType_view",
"title": "物料种类查询",
"target": "_self"
}
]
},
{
"icon": "fa fa-mail-forward",
"href": "",
"title": "物料管理",
"target": "_self",
"child": [
{
"icon": "layui-icon layui-icon-template-1",
"href": "/material_add",
"title": "创建物料",
"target": "_self"
},
{
"icon": "layui-icon layui-icon-template-1",
"href": "/material_out",
"title": "物料查询",
"target": "_self"
}
]
}
]
},
{
"icon": "fa fa-slideshare",
"href": "",
"title": "辅助管理",
"target": "_self",
"child": [
{
"icon": "layui-icon layui-icon-template-1",
"href": "/table_user",
"title": "人员管理",
"target": "_self",
"child": []
},
{
"icon": "layui-icon layui-icon-template-1",
"href": "/notice_edit",
"title": "公告发布",
"target": "_self",
"child": []
}
]
}
]
}

10
target/classes/static/api/upload.json

@ -1,10 +0,0 @@
{
"code": 1,
"msg": "上传成功",
"data": {
"url": [
"../images/logo.png",
"../images/captcha.jpg"
]
}
}

934
target/classes/static/css/layuimini.css

@ -1,934 +0,0 @@
/**
配色方案如有需要请自行配置
*/
/**头部-配色*/
.layui-layout-admin .layui-header {
background-color: #1aa094 !important;
}
.layui-header > ul > .layui-nav-item.layui-this, .layuimini-tool i:hover {
background-color: #197971 !important;
}
.layui-header .layuimini-header-content > ul > .layui-nav-item.layui-this, .layuimini-tool i:hover {
background-color: #197971 !important;
}
/**logo-配色*/
.layui-layout-admin .layuimini-logo {
background-color: #243346 !important;
}
/**左侧-配色*/
.layui-side.layui-bg-black, .layui-side.layui-bg-black > .layuimini-menu-left > ul {
background-color: #2f4056 !important;
}
.layuimini-menu-left .layui-nav .layui-nav-child a:hover:not(.layui-this) {
background-color: #3b3f4b;
}
/**左侧菜单选中-配色*/
.layui-layout-admin .layui-nav-tree .layui-this, .layui-layout-admin .layui-nav-tree .layui-this > a, .layui-layout-admin .layui-nav-tree .layui-nav-child dd.layui-this, .layui-layout-admin .layui-nav-tree .layui-nav-child dd.layui-this a {
background-color: #1aa094 !important;
}
/**头部样式 */
.layui-layout-admin .header {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
}
.layuimini-header-menu, .layui-header {
height: 60px !important;
}
.layuimini-header-menu > .layui-nav-item {
color: #1b1d21;
height: 60px !important;
line-height: 60px !important;
}
.layui-header > .layui-layout-right > .layui-nav-item {
height: 60px !important;
line-height: 60px !important;
}
.layui-layout-left {
left: 295px !important;
}
.layui-nav.layui-layout-left.layuimini-header-menu.layuimini-pc-show {
font-weight: bold;
transition: all .2s;
}
/**logo演示(通用) */
.layui-layout-admin .layuimini-logo {
font-weight: bold;
color: #ffffff !important;
height: 60px !important;
line-height: 60px !important;
overflow: hidden;
line-height: 64px;
transition: all .2s !important;
}
.layui-layout-admin .layuimini-logo img {
display: inline-block;
height: 40px;
vertical-align: middle;
}
.layui-layout-admin .layuimini-logo h1 {
display: inline-block;
margin: 0 0 0 12px;
color: #ffffff;
font-weight: 600;
font-size: 20px;
font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif;
vertical-align: middle;
}
/**缩放工具(通用) */
.layuimini-tool {
position: absolute !important;
top: 0;
left: 235px;
width: 60px;
height: 100%;
line-height: 60px;
text-align: center;
color: #ffffff !important;
transition: all .2s;
}
/**缩放工具(缩放) */
.layuimini-tool i {
display: block;
color: #bbe3df;
width: 32px;
height: 32px;
line-height: 32px;
border-radius: 3px;
text-align: center;
margin-top: 15px;
cursor: pointer;
}
/**tab选项卡 */
.layuimini-tab {
margin: 0px;
overflow: hidden;
height: 100% !important;
}
.layuimini-tab .layui-tab-content {
height: calc(100% - 37px) !important;
}
.layuimini-tab .layui-tab-content .layui-tab-item {
height: 100%;
}
.layuimini-tab .layui-tab-content {
padding: 0px;
}
.layuimini-tab .layui-tab-title {
border: none;
border: 1px solid whitesmoke;
background-color: white;
}
.layuimini-tab .layui-tab-title li {
border-right: 1px solid whitesmoke;
color: dimgray;
}
.layuimini-tab .layui-tab-title .layui-tab-bar {
display: none;
}
.layuimini-tab .layui-tab-title .layui-this:after {
display: none;
}
.layuimini-tab .layui-tab-title .layuimini-tab-active {
display: inline-block;
background-color: lightgray;
width: 9px;
height: 9px;
border-radius: 30px;
margin-right: 5px;
}
.layuimini-tab .layui-tab-title .layui-this .layuimini-tab-active {
background-color: #1aa094;
}
.layuimini-tab > .layui-tab-title, .layuimini-tab > .close-box {
height: 35px !important;
}
.layuimini-tab > .layui-tab-title li, .layuimini-tab > .close-box li {
line-height: 35px !important;
}
.layuimini-tab .layui-tab-title span {
color: #acafb1;
}
.layuimini-tab .layui-tab-title .layui-this span {
color: dimgray;
}
.layuimini-tab .layui-tab-title .layui-tab-close {
font-size: 12px !important;
width: 14px !important;
height: 14px !important;
line-height: 16px !important;
}
.layuimini-tab .layui-tab-title .layui-tab-close:hover {
border-radius: 4em;
background: #ff5722;
}
.layuimini-tab .layui-tab-title .disable-close + .layui-tab-close {
display: none;
}
.layuimini-tab .layui-tab-title .able-close + .layui-tab-close {
display: inline-block;
}
.layuimini-tab .layui-tab-control > li {
position: absolute;
top: 0px;
height: 35px;
line-height: 35px;
width: 35px;
text-align: center;
background-color: white;
border-top: whitesmoke 1px solid;
border-bottom: whitesmoke 1px solid;
}
.layuimini-tab .layuimini-tab-roll-left {
left: 0px;
border-right: whitesmoke 1px solid;
border-left: whitesmoke 1px solid;
}
.layuimini-tab .layuimini-tab-roll-right {
right: 35px;
border-left: 1px solid whitesmoke;
}
.layuimini-tab .layui-tab-tool {
right: 0px;
border-left: 1px solid whitesmoke;
}
.layuimini-tab .layui-tab-control .layui-tab-tool,
.layuimini-tab .layui-tab-control .layuimini-tab-roll-left,
.layuimini-tab .layui-tab-control .layuimini-tab-roll-right {
display: none;
}
.layuimini-tab.layui-tab-roll .layui-tab-control .layuimini-tab-roll-left,
.layuimini-tab.layui-tab-roll .layui-tab-control .layuimini-tab-roll-right {
display: block;
}
.layuimini-tab.layui-tab-roll .layui-tab-control .layuimini-tab-roll-right {
right: 0px;
border-right: 1px solid whitesmoke;
}
.layuimini-tab.layui-tab-roll .layui-tab-title {
padding-left: 35px;
padding-right: 35px;
}
.layuimini-tab.layui-tab-tool .layui-tab-control .layui-tab-tool {
display: block;
}
.layuimini-tab.layui-tab-tool .layui-tab-title {
padding-left: 0px;
padding-right: 35px;
}
.layuimini-tab.layui-tab-rollTool .layui-tab-title {
padding-left: 35px;
padding-right: 80px;
}
.layuimini-tab.layui-tab-rollTool .layui-tab-control .layuimini-tab-roll-left,
.layuimini-tab.layui-tab-rollTool .layui-tab-control .layuimini-tab-roll-right,
.layuimini-tab.layui-tab-rollTool .layui-tab-control .layui-tab-tool {
display: block;
}
.layuimini-tab .layui-tab-tool .layui-nav {
position: absolute;
height: 43px !important;
top: 0;
width: 100%;
height: 100%;
padding: 0;
background: 0 0;
}
.layuimini-tab .layui-tab-tool .layui-nav-item {
height: 35px;
}
.layuimini-tab .layui-tab-tool .layui-nav-bar {
display: none;
}
.layuimini-tab .layui-tab-tool .layui-nav-child {
left: auto;
top: 45px;
right: 3px;
width: 120px;
border: 1px solid whitesmoke;
}
.layuimini-tab .layui-tab-tool .layui-this a {
background-color: #009688;
}
.layuimini-tab-loading {
position: absolute;
display: none;
width: 100%;
height: calc(100% - 37px);
top: 37px;
z-index: 19;
background-color: #fff
}
.layuimini-tab-loading.close {
animation: close 1s;
-webkit-animation: close 1s;
animation-fill-mode: forwards;
}
/**左侧菜单栏 (通用) */
.layui-side.layui-bg-black {
transition: all .2s;
}
.layui-side.layui-bg-black > .layuimini-menu-left > ul {
transition: all .2s;
}
.layui-side.layui-bg-black > .layuimini-menu-left > ul > .layui-nav-item:first-child {
border-top: 1px solid #4b5461;
}
.layuimini-menu-left .layui-nav .layui-nav-item a {
height: 40px;
line-height: 40px;
padding-right: 30px;
}
.layuimini-menu-left .layui-nav .layui-nav-item > a {
padding-top: 5px;
padding-bottom: 5px;
}
.layuimini-menu-left .layui-nav .layui-nav-child .layui-nav-child {
background: 0 0 !important
}
.layuimini-menu-left .layui-nav .layui-nav-more {
right: 15px;
}
.layuimini-menu-left .layui-nav .layui-nav-item a:hover {
background-color: transparent !important;
}
.layuimini-menu-left .layui-nav {
background-color: transparent !important;
}
/**左侧菜单栏 (正常) */
.layui-layout-body .layui-nav-itemed .layui-nav-child a, .layui-layout-body .layuimini-menu-left .layui-nav .layui-nav-child a {
padding-left: 35px;
}
.layui-layout-body .layuimini-menu-left .layui-nav .layui-nav-child .layui-nav-child a {
padding-left: 45px;
}
.layui-layout-body .layuimini-menu-left .layui-nav .layui-nav-child .layui-nav-child .layui-nav-child a {
padding-left: 55px;
}
.layui-layout-body .layuimini-menu-left .layui-nav .layui-nav-child .layui-nav-child .layui-nav-child .layui-nav-child a {
padding-left: 65px;
}
.layui-layout-body .layuimini-menu-left .layui-nav .layui-nav-itemed > .layui-nav-child {
padding: 5px 0;
}
/**内容主体(通用) */
.layui-layout-admin .layui-body {
overflow: hidden;
bottom: 0px !important;
top: 60px !important;
transition: all .2s;
}
/**选择配色方案 */
.layuimini-color .color-title {
padding: 10px 0 10px 20px;
border-bottom: 1px solid #d9dada;
margin-bottom: 8px;
}
.layuimini-color .color-content {
padding: 10px 5px 0 5px;
}
.layuimini-color .color-content ul {
list-style: none;
text-align: center;
}
.layuimini-color .color-content ul li {
position: relative;
display: inline-block;
vertical-align: top;
width: 80px;
height: 50px;
margin: 0 15px 15px 0;
padding: 2px 2px 4px 2px;
background-color: #f2f2f2;
cursor: pointer;
font-size: 12px;
color: #666;
}
.layuimini-color .color-content li.layui-this:after, .layuimini-color .color-content li:hover:after {
width: 100%;
height: 100%;
padding: 4px;
top: -5px;
left: -5px;
border-color: #d8d8d8;
opacity: 1;
}
.layuimini-color .color-content li:after {
content: '';
position: absolute;
z-index: 20;
top: 50%;
left: 50%;
width: 1px;
height: 0;
border: 1px solid #f2f2f2;
transition: all .3s;
-webkit-transition: all .3s;
opacity: 0;
}
/**其它 */
.layui-tab-item {
width: 100% !important;
height: 100% !important;
}
.layui-nav-item.layui-this {
background-color: #1b1d21;
}
.layui-width-height {
width: 100%;
height: 95%;
}
.layui-tab {
margin: 0 0 0 0;
z-index: 99999;
}
.text-center {
height: 30px !important;
line-height: 30px !important;
text-align: center !important;
}
.layui-nav {
padding: 0 !important;
}
.layui-nav .layui-this:after, .layui-nav-bar, .layui-nav-tree .layui-nav-itemed:after {
width: 0 !important;
height: 0 !important;
}
.layui-layout-admin .layui-side {
top: 60px !important;
}
.layui-tab-card {
box-shadow: 0px 0px 0px #888888;
border-bottom: 0;
}
/**自定义滚动条样式 */
::-webkit-scrollbar {
display: none
}
/*移动端遮罩层*/
.layuimini-make {
position: fixed;
left: 0;
right: 0;
bottom: 0;
top: 0;
z-index: 1000;
background: rgba(0, 0, 0, .5);
display: none;
}
.layuimini-mini .layui-header {
z-index: 1001;
}
/**初始化加载层*/
.layuimini-loader {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: #ffffff;
z-index: 999999;
}
.layuimini-loader .layuimini-loader-inner {
display: block;
position: relative;
left: 50%;
top: 50%;
width: 150px;
height: 150px;
margin: -75px 0 0 -75px;
border-radius: 50%;
border: 3px solid transparent;
border-top-color: #1E9FFF;
animation: spin 2s linear infinite;
}
.layuimini-loader .layuimini-loader-inner:before {
content: "";
position: absolute;
top: 5px;
left: 5px;
right: 5px;
bottom: 5px;
border-radius: 50%;
border: 3px solid transparent;
border-top-color: #1E9FFF;
animation: spin 3s linear infinite;
}
.layuimini-loader .layuimini-loader-inner:after {
content: "";
position: absolute;
top: 15px;
left: 15px;
right: 15px;
bottom: 15px;
border-radius: 50%;
border: 3px solid transparent;
border-top-color: #1E9FFF;
animation: spin 1.5s linear infinite;
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
to {
transform: rotate(1turn);
}
}
/*系统设置*/
.layuimini-color .layui-word-aux {
position: absolute;
left: 60px;
top: 12px;
font-size: 12px;
}
.layuimini-color .layui-input-block {
margin-left: 15px;
min-height: 36px;
}
.layuimini-color .more-menu-list {
width: 100%;
margin-top: 30px;
}
.layuimini-color .more-menu-item:first-child {
border-top: 1px solid #e8e8e8;
}
.layuimini-color .more-menu-item .layui-icon {
font-size: 18px;
padding-right: 10px;
}
.layuimini-color .more-menu-item {
color: #595959;
height: 50px;
line-height: 50px;
font-size: 16px;
padding: 0 25px;
border-bottom: 1px solid #e8e8e8;
font-style: normal;
display: block;
}
.layuimini-color .more-menu-item:hover {
background-color: whitesmoke;
}
.layuimini-color .more-menu-item:after {
color: #8c8c8c;
right: 16px;
content: "\e602";
position: absolute;
font-family: layui-icon !important;
}
/**
鼠标右键
*/
.layuimini-tab-mousedown {
display: none;
width: 80px;
position: absolute;
top: 0px !important;
left: 0px !important;
}
.layuimini-tab-mousedown dd a {
padding: 0 15px;
color: #484545;
}
.layuimini-tab-make {
position: absolute;
top: 36px;
bottom: 0px;
width: 100%;
background: rgb(255, 255, 255, 0);
padding: 0px;
overflow: hidden;
}
/**
菜单缩放
*/
.popup-tips .layui-layer-TipsG {
display: none;
}
.popup-tips.layui-layer-tips .layui-layer-content {
padding: 0;
}
.popup-tips .layui-nav-tree {
width: 150px;
border-radius: 10px;
}
/**左侧菜单字体间距*/
.layuimini-menu-left .layui-nav-item a span {
letter-spacing: 1px;
}
/**头部菜单字体间距*/
.layui-layout-admin .layui-header .layuimini-header-menu.layuimini-pc-show, .layui-layout-admin .layui-header .layuimini-header-menu.layuimini-mobile-show {
letter-spacing: 1px;
}
/**左侧菜单更多下拉样式*/
.layuimini-menu-left .layui-nav-more, .layuimini-menu-left-zoom .layui-nav-more {
font-family: layui-icon !important;
font-size: 12px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
overflow: hidden;
width: auto;
height: auto;
line-height: normal;
border: none;
display: inline-block;
margin-top: -6px !important;
}
.layuimini-menu-left .layui-nav-child .layui-nav-more {
margin-top: -6px !important;
}
.layuimini-menu-left .layui-nav .layui-nav-mored, .layuimini-menu-left .layui-nav-itemed > a .layui-nav-more {
margin-top: -9px !important;
}
.layuimini-menu-left-zoom.layui-nav .layui-nav-mored, .layuimini-menu-left-zoom.layui-nav-itemed > a .layui-nav-more {
margin-top: -9px !important;
}
.layuimini-menu-left .layui-nav-more:before, .layuimini-menu-left-zoom .layui-nav-more:before {
content: "\e61a";
}
.layuimini-menu-left .layui-nav-itemed > a > .layui-nav-more, .layuimini-menu-left-zoom .layui-nav-itemed > a > .layui-nav-more {
transform: rotate(180deg);
-ms-transform: rotate(180deg);
-moz-transform: rotate(180deg);
-webkit-transform: rotate(180deg);
-o-transform: rotate(180deg);
width: 12px;
text-align: center;
border-style: none;
}
.layuimini-menu-left .layui-nav-itemed > a > .layui-nav-more:before, .layuimini-menu-left-zoom .layui-nav-itemed > a > .layui-nav-more:before {
content: '\e61a';
background-color: transparent;
display: inline-block;
vertical-align: middle;
}
/**修复左侧菜单字体不对齐的问题*/
.layuimini-menu-left .layui-nav-item a .fa, .layuimini-menu-left .layui-nav-item a .layui-icon {
width: 20px;
}
/**
PC版样式
*/
@media screen and (min-width: 1025px) {
/**头部样式(缩放) */
.layuimini-mini .layui-layout-left.layuimini-header-menu.layuimini-pc-show {
left: 155px !important;
}
/**logo演示(缩放) */
.layuimini-mini .layui-layout-admin .layuimini-logo {
width: 60px !important;
}
.layuimini-mini .layui-layout-admin .layuimini-logo h1 {
display: none;
}
/**左侧菜单栏(缩放) */
.layuimini-mini .layuimini-menu-left {
width: 80px !important;
}
.layuimini-mini .layui-side.layui-bg-black, .layuimini-mini .layuimini-menu-left > ul, .layuimini-mini .layuimini-menu-left > ul li i {
width: 60px !important;
}
.layuimini-mini .layuimini-menu-left > ul li span:first-child {
display: none;
}
.layuimini-mini .layuimini-menu-left > ul li span:last-child {
float: right;
right: 7px;
}
.layuimini-mini .layuimini-menu-left .layui-nav .layui-nav-item a {
height: 40px;
line-height: 40px;
padding-right: 0px !important;
}
/**内容主体(缩放) */
.layuimini-mini .layui-layout-admin .layui-body {
left: 60px !important;
}
.layuimini-mini .layuimini-tool {
left: 95px !important;
}
.layuimini-pc-show {
display: block;
}
.layuimini-mobile-show {
display: none;
}
/**菜单缩放*/
.layuimini-mini .layuimini-menu-left .layui-nav-more, .layuimini-mini .layuimini-menu-left .layui-nav-child {
display: none;
!important;
}
}
/**
手机自适应样式
*/
@media screen and (max-width: 1024px) {
/**
todo 修复低版本IOS不能滑动问题, 但还是有问题, 低版本IOS部分情况下子页面无法自适应
*/
.layuimini-tab .layui-tab-content .layui-tab-item {
-webkit-overflow-scrolling: touch;
overflow: scroll;
width: 100%;
height: 100%;
}
.layuimini-tab .layui-tab-content .layui-tab-item iframe {
height: 100%;
width: 100%;
}
.layuimini-pc-show {
display: none;
}
.layuimini-mobile-show {
display: block;
}
.layuimini-header-content {
left: 0;
}
.layui-layout-admin .layui-body .layui-tab-item.layui-show {
border-top: 1px solid #e2e2e2;
}
.layuimini-all .layui-layout-left.layuimini-header-menu {
left: 15px !important
}
.layuimini-mini .layui-layout-left.layuimini-header-menu {
left: 205px !important
}
.layui-layout-admin .layui-nav.layui-layout-right > li:not(.layuimini-setting) {
width: 40px !important;
}
.layui-layout-admin .layui-nav.layui-layout-right > li:not(.layuimini-setting) a {
padding: 0 15px;
}
.layuimini-all .layui-layout-admin .layui-body {
left: 0px !important;
}
.layuimini-mini .layui-layout-admin .layuimini-menu-left, .layuimini-mini .layui-header .layuimini-logo {
left: 0;
transition: left .2s;
z-index: 1001 !important;
}
.layuimini-all .layui-layout-admin .layuimini-menu-left, .layuimini-all .layui-header .layuimini-logo {
left: -200px;
transition: left .2s;
top: 0;
z-index: 1002;
}
.layuimini-mini .layui-layout-admin .layui-body {
left: 0 !important;
transition: left .2s;
top: 0;
z-index: 998;
}
.layuimini-mini .layuimini-make {
display: block;
}
.layuimini-multi-module .layuimini-header-content .layuimini-tool {
display: none;
}
.layuimini-single-module .layuimini-header-content .layuimini-tool {
left: 15px;
}
.layuimini-mini .layuimini-site-mobile {
display: none !important;
}
.layuimini-site-mobile {
display: block !important;
position: fixed;
z-index: 100000;
bottom: 15px;
left: 15px;
width: 40px;
height: 40px;
line-height: 40px;
border-radius: 2px;
text-align: center;
background-color: rgba(0, 0, 0, .7);
color: #fff;
}
.layuimini-header-content {
z-index: 997;
}
/*修复UC之类的浏览器点击无效*/
.layuimini-make {
cursor: pointer;
}
.layuimini-site-mobile {
cursor: pointer;
}
}
@media screen and (max-width: 550px) {
/**头部右侧数据*/
.layuimini-multi-module.layuimini-mini .layuimini-header-content .layui-layout-right {
display: none;
}
}

99
target/classes/static/css/public.css

@ -1,99 +0,0 @@
body {
margin: 15px 15px 15px 15px;
background: #f2f2f2;
}
.layuimini-container {
border: 1px solid #f2f2f2;
border-radius: 5px;
background-color: #ffffff
}
.layuimini-main {
margin: 10px 10px 10px 10px;
}
/**必填红点 */
.layuimini-form > .layui-form-item > .required:after {
content: '*';
color: red;
position: absolute;
margin-left: 4px;
font-weight: bold;
line-height: 1.8em;
top: 6px;
right: 5px;
}
.layuimini-form > .layui-form-item > .layui-form-label {
width: 120px !important;
}
.layuimini-form > .layui-form-item > .layui-input-block {
margin-left: 150px !important;
}
.layuimini-form > .layui-form-item > .layui-input-block > tip {
display: inline-block;
margin-top: 10px;
line-height: 10px;
font-size: 10px;
color: #a29c9c;
}
/**搜索框*/
.layuimini-container .table-search-fieldset {
margin: 0;
border: 1px solid #e6e6e6;
padding: 10px 20px 5px 20px;
color: #6b6b6b;
}
/**自定义滚动条样式 */
::-webkit-scrollbar {
width: 6px;
height: 6px
}
::-webkit-scrollbar-track {
background-color: transparent;
-webkit-border-radius: 2em;
-moz-border-radius: 2em;
border-radius: 2em;
}
::-webkit-scrollbar-thumb {
background-color: #9c9da0;
-webkit-border-radius: 2em;
-moz-border-radius: 2em;
border-radius: 2em
}
.my-shadow:hover {
box-shadow: 2px 0 4px rgba(0, 21, 41, .35);
}
.my-card {
cursor: pointer;
width: 100%;
display: inline-block;
border-top-left-radius: 4px;
border-top-right-radius: 4px;
}
.my-card-context{
margin-left: 15px;
font-size: 18px;
margin-top: 5px;
font-weight:normal;
}
.my-time {
margin-top: 40px;
margin-bottom: 20px;
}
body {
font-family: 华文楷体;
font-weight: bold;
}

95
target/classes/static/css/themes/default.css

@ -1,95 +0,0 @@
/*头部右侧背景色 headerRightBg */
.layui-layout-admin .layui-header {
background-color: #ffffff !important;
}
/*头部右侧选中背景色 headerRightBgThis */
.layui-layout-admin .layui-header .layuimini-header-content > ul > .layui-nav-item.layui-this, .layuimini-tool i:hover {
background-color: #e4e4e4 !important;
}
/*头部右侧字体颜色 headerRightColor */
.layui-layout-admin .layui-header .layui-nav .layui-nav-item a {
color: rgba(107, 107, 107, 0.7);
}
/**头部右侧下拉字体颜色 headerRightChildColor */
.layui-layout-admin .layui-header .layui-nav .layui-nav-item .layui-nav-child a {
color: rgba(107, 107, 107, 0.7) !important;
}
/*头部右侧鼠标选中 headerRightColorThis */
.layui-header .layuimini-menu-header-pc.layui-nav .layui-nav-item a:hover, .layui-header .layuimini-header-menu.layuimini-pc-show.layui-nav .layui-this a {
color: #565656 !important;
}
/*头部右侧更多下拉颜色 headerRightNavMore */
.layui-header .layui-nav .layui-nav-more {
border-top-color: rgba(160, 160, 160, 0.7) !important;
}
/*头部右侧更多下拉颜色 headerRightNavMore */
.layui-header .layui-nav .layui-nav-mored, .layui-header .layui-nav-itemed > a .layui-nav-more {
border-color: transparent transparent rgba(160, 160, 160, 0.7) !important;
}
/**头部右侧更多下拉配置色 headerRightNavMoreBg headerRightNavMoreColor */
.layui-header .layui-nav .layui-nav-child dd.layui-this a, .layui-header .layui-nav-child dd.layui-this, .layui-layout-admin .layui-header .layui-nav .layui-nav-item .layui-nav-child .layui-this a {
background-color: #1E9FFF !important;
color: #ffffff !important;
}
/*头部缩放按钮样式 headerRightToolColor */
.layui-layout-admin .layui-header .layuimini-tool i {
color: #565656;
}
/*logo背景颜色 headerLogoBg */
.layui-layout-admin .layuimini-logo {
background-color: #192027 !important;
}
/*logo字体颜色 headerLogoColor */
.layui-layout-admin .layuimini-logo h1 {
color: rgb(191, 187, 187);
}
/*左侧菜单更多下拉样式 leftMenuNavMore */
.layuimini-menu-left .layui-nav .layui-nav-more, .layuimini-menu-left-zoom.layui-nav .layui-nav-more {
border-top-color: rgb(191, 187, 187);
}
/*左侧菜单更多下拉样式 leftMenuNavMore */
.layuimini-menu-left .layui-nav .layui-nav-mored, .layuimini-menu-left .layui-nav-itemed > a .layui-nav-more, .layuimini-menu-left-zoom.layui-nav .layui-nav-mored, .layuimini-menu-left-zoom.layui-nav-itemed > a .layui-nav-more {
border-color: transparent transparent rgb(191, 187, 187) !important;
}
/*左侧菜单背景 leftMenuBg */
.layui-side.layui-bg-black, .layui-side.layui-bg-black > .layuimini-menu-left > ul, .layuimini-menu-left-zoom > ul {
background-color: #28333E !important;
}
/*左侧菜单选中背景 leftMenuBgThis */
.layuimini-menu-left .layui-nav-tree .layui-this, .layuimini-menu-left .layui-nav-tree .layui-this > a, .layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this, .layuimini-menu-left .layui-nav-tree .layui-nav-child dd.layui-this a, .layuimini-menu-left-zoom.layui-nav-tree .layui-this, .layuimini-menu-left-zoom.layui-nav-tree .layui-this > a, .layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this, .layuimini-menu-left-zoom.layui-nav-tree .layui-nav-child dd.layui-this a {
background-color: #1E9FFF !important
}
/*左侧菜单子菜单背景 leftMenuChildBg */
.layuimini-menu-left .layui-nav-itemed > .layui-nav-child {
background-color: #0c0f13 !important;
}
/*左侧菜单字体颜色 leftMenuColor */
.layuimini-menu-left .layui-nav .layui-nav-item a, .layuimini-menu-left-zoom.layui-nav .layui-nav-item a {
color: rgb(191, 187, 187) !important;
}
/*左侧菜单选中字体颜色 leftMenuColorThis */
.layuimini-menu-left .layui-nav .layui-nav-item a:hover, .layuimini-menu-left .layui-nav .layui-this a, .layuimini-menu-left-zoom.layui-nav .layui-nav-item a:hover, .layuimini-menu-left-zoom.layui-nav .layui-this a {
color: #ffffff !important;
}
/**tab选项卡选中颜色 tabActiveColor */
.layuimini-tab .layui-tab-title .layui-this .layuimini-tab-active {
background-color: #1e9fff;
}

BIN
target/classes/static/images/bg.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

BIN
target/classes/static/images/cam.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 625 B

BIN
target/classes/static/images/captcha.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

BIN
target/classes/static/images/donate_qrcode.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

BIN
target/classes/static/images/favicon.ico

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

BIN
target/classes/static/images/home.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 KiB

BIN
target/classes/static/images/icon-login.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

BIN
target/classes/static/images/loginbg.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 671 KiB

BIN
target/classes/static/images/logo.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

BIN
target/classes/static/images/logo.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

BIN
target/classes/static/images/logo_back.ico

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 KiB

BIN
target/classes/static/images/logo_back.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 KiB

BIN
target/classes/static/images/logo_back.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 KiB

BIN
target/classes/static/images/search.ico

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

BIN
target/classes/static/images/search.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

BIN
target/classes/static/images/sousuo.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save