Kaynağa Gözat

Merge branch 'dev' of depot-qinghai/depot-device-qinghai into master

gdd 6 ay önce
ebeveyn
işleme
328fcbbde0
20 değiştirilmiş dosya ile 3245 ekleme ve 14 silme
  1. 33 0
      .gitignore
  2. 151 0
      src/main/java/com/chinaitop/depot/device/controller/BusinessImAssetController.java
  3. 103 0
      src/main/java/com/chinaitop/depot/device/controller/BusinessImPurchaseSaleController.java
  4. 6 13
      src/main/java/com/chinaitop/depot/device/controller/DFacilitiesController.java
  5. 30 0
      src/main/java/com/chinaitop/depot/device/mapper/BusinessImAssetMapper.java
  6. 338 0
      src/main/java/com/chinaitop/depot/device/mapper/BusinessImAssetMapper.xml
  7. 37 0
      src/main/java/com/chinaitop/depot/device/mapper/BusinessImPurchaseSaleMapper.java
  8. 59 0
      src/main/java/com/chinaitop/depot/device/mapper/BusinessImPurchaseSaleMapper.xml
  9. 239 0
      src/main/java/com/chinaitop/depot/device/model/BusinessImAsset.java
  10. 1069 0
      src/main/java/com/chinaitop/depot/device/model/BusinessImAssetExample.java
  11. 239 0
      src/main/java/com/chinaitop/depot/device/model/BusinessImPurchaseSale.java
  12. 7 0
      src/main/java/com/chinaitop/depot/device/model/DFacilitiesBasics.java
  13. 262 0
      src/main/java/com/chinaitop/depot/device/model/param/BusinessImPurchaseSaleAddParam.java
  14. 225 0
      src/main/java/com/chinaitop/depot/device/model/param/BusinessImPurchaseSaleEditParam.java
  15. 86 0
      src/main/java/com/chinaitop/depot/device/model/param/BusinessImPurchaseSalePageParam.java
  16. 21 0
      src/main/java/com/chinaitop/depot/device/service/BusinessImAssetService.java
  17. 64 0
      src/main/java/com/chinaitop/depot/device/service/BusinessImPurchaseSaleService.java
  18. 126 0
      src/main/java/com/chinaitop/depot/device/service/impl/BusinessImAssetServiceImpl.java
  19. 149 0
      src/main/java/com/chinaitop/depot/device/service/impl/BusinessImPurchaseSaleServiceImpl.java
  20. 1 1
      src/main/resources/bootstrap-dev.yml

+ 33 - 0
.gitignore

@@ -0,0 +1,33 @@
1
+HELP.md
2
+target/
3
+!.mvn/wrapper/maven-wrapper.jar
4
+!**/src/main/**/target/
5
+!**/src/test/**/target/
6
+
7
+### STS ###
8
+.apt_generated
9
+.classpath
10
+.factorypath
11
+.project
12
+.settings
13
+.springBeans
14
+.sts4-cache
15
+
16
+### IntelliJ IDEA ###
17
+.idea
18
+*.iws
19
+*.iml
20
+*.ipr
21
+
22
+### NetBeans ###
23
+/nbproject/private/
24
+/nbbuild/
25
+/dist/
26
+/nbdist/
27
+/.nb-gradle/
28
+build/
29
+!**/src/main/**/build/
30
+!**/src/test/**/build/
31
+
32
+### VS Code ###
33
+.vscode/

+ 151 - 0
src/main/java/com/chinaitop/depot/device/controller/BusinessImAssetController.java

@@ -0,0 +1,151 @@
1
+package com.chinaitop.depot.device.controller;
2
+
3
+import java.util.HashMap;
4
+import java.util.List;
5
+import java.util.Map;
6
+
7
+import javax.annotation.Resource;
8
+import javax.servlet.http.HttpServletRequest;
9
+
10
+import org.springframework.http.MediaType;
11
+import org.springframework.web.bind.annotation.RequestBody;
12
+import org.springframework.web.bind.annotation.RequestMapping;
13
+import org.springframework.web.bind.annotation.RequestMethod;
14
+import org.springframework.web.bind.annotation.RestController;
15
+
16
+import com.chinaitop.depot.device.model.BusinessImAsset;
17
+import com.chinaitop.depot.device.model.BusinessImAssetExample;
18
+import com.chinaitop.depot.device.service.BusinessImAssetService;
19
+import com.chinaitop.depot.utils.ParameterUtil;
20
+import com.fasterxml.jackson.databind.ObjectMapper;
21
+import com.github.pagehelper.PageHelper;
22
+import com.github.pagehelper.PageInfo;
23
+
24
+
25
+import io.swagger.annotations.Api;
26
+import io.swagger.annotations.ApiImplicitParam;
27
+import io.swagger.annotations.ApiImplicitParams;
28
+import io.swagger.annotations.ApiOperation;
29
+
30
+/**
31
+ * 
32
+ */
33
+
34
+@RestController
35
+@RequestMapping(value= "/businessImAsset")
36
+@Api(value= "BusinessImAssetController", description = "资产管理")
37
+public class BusinessImAssetController {
38
+
39
+	@Resource
40
+	private BusinessImAssetService businessImAssetService;
41
+	
42
+	
43
+	
44
+	 /**
45
+     * 资产管理列表
46
+	 * @throws Exception 
47
+     */
48
+	@RequestMapping(value = "/getList",produces = MediaType.APPLICATION_JSON_VALUE,method=RequestMethod.GET)
49
+    @ApiOperation(value="查询资产管理列表信息", notes = "查询资产管理列表信息,支持分页")
50
+  	@ApiImplicitParams({
51
+  			@ApiImplicitParam(name = "pageNum", value = "页码", paramType = "query"),
52
+  			@ApiImplicitParam(name = "pageSize", value = "每页条数", paramType = "query"),
53
+  			@ApiImplicitParam(name = "assetCode", value = "资产编号", paramType = "query"),
54
+  			@ApiImplicitParam(name = "assetStatus", value = "资产状态", paramType = "query")
55
+
56
+  	})
57
+    public PageInfo<BusinessImAsset> getList(HttpServletRequest request,Integer pageNum, Integer pageSize, String assetCode, Integer assetStatus,Integer orgId) throws Exception{
58
+    	
59
+		BusinessImAssetExample businessImAssetExample=new BusinessImAssetExample();
60
+		BusinessImAssetExample.Criteria criteria=businessImAssetExample.createCriteria();
61
+		
62
+    	if(ParameterUtil.isnotnull(assetCode)){
63
+    		criteria.andAssetCodeLike(assetCode);
64
+    	}
65
+    	if(ParameterUtil.isnotnull(assetStatus)){
66
+    		criteria.andAssetStatusEqualTo(assetStatus);
67
+    	}
68
+    	if(ParameterUtil.isnotnull(orgId)){
69
+    		criteria.andOrgIdEqualTo(orgId);
70
+    	}
71
+
72
+        //排序
73
+    	businessImAssetExample.setOrderByClause("id desc");
74
+        
75
+        if (pageNum!=null && pageSize!=null) {
76
+            PageHelper.startPage(pageNum, pageSize);
77
+        }
78
+        List<BusinessImAsset> list = businessImAssetService.getList(businessImAssetExample);
79
+        PageInfo<BusinessImAsset> pageInfo = new PageInfo<BusinessImAsset>(list);
80
+        return pageInfo;
81
+    }
82
+
83
+    
84
+    /**
85
+     * 根据主键id删除数据
86
+     */
87
+	 @RequestMapping(value="/remove", produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.POST)
88
+	 @ApiOperation(value="删除数据", notes = "根据id删除数据")
89
+	 @ApiImplicitParams({
90
+	   	 @ApiImplicitParam(name = "id", value = "id", paramType = "form"),
91
+	 })    
92
+	 public Map<String, Object> remove(Integer id){
93
+        Map<String,Object> retMap = new HashMap<String,Object>();
94
+        businessImAssetService.remove(id);
95
+        retMap.put("msg","success");
96
+        return retMap;
97
+    }
98
+	
99
+    /**
100
+     * 新增和修改的数据进行保存
101
+     */
102
+	 @RequestMapping(value="/save",produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.POST)
103
+	 @ApiOperation(value="保存数据", notes = "保存")
104
+	
105
+    public Map<String, Object> save(@RequestBody BusinessImAsset businessImAsset) {
106
+        Map<String, Object> modelMap = new HashMap<>();
107
+        // JSON字符串转对象
108
+        ObjectMapper mapper = new ObjectMapper();
109
+        try {
110
+        	businessImAssetService.save(businessImAsset);
111
+            modelMap.put("status", "success");
112
+        } catch (Exception e) {
113
+            modelMap.put("status", "error");
114
+            modelMap.put("msg", "保存失败!");
115
+            e.printStackTrace();
116
+        }
117
+        return modelMap;
118
+    }
119
+
120
+	   
121
+	 
122
+    /**
123
+     * 根据id加载对应数据
124
+     */
125
+	 @RequestMapping(value ="/loadDataById", produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
126
+	 @ApiOperation(value="查询数据", notes = "根据id查询数据")
127
+	 @ApiImplicitParams({
128
+		  @ApiImplicitParam(name = "id", value = "id", paramType = "query"),
129
+	 })
130
+    public BusinessImAsset loadDataById(int id){
131
+	   if(id != 0) {
132
+           return  businessImAssetService.loadDataById(id);
133
+       }
134
+       return new BusinessImAsset();
135
+    }
136
+   
137
+	 
138
+	 /**
139
+	  * 资产编号获取
140
+	  */
141
+	@RequestMapping(value ="/getAssetCode", produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.GET)
142
+	@ApiOperation(value="资产编号获取", notes = "资产编号获取")
143
+	@ApiImplicitParams({
144
+			@ApiImplicitParam(name = "orgId", value = "单位id", paramType = "query")
145
+	})
146
+    public String getAssetCode(Integer orgId){
147
+		
148
+	   return businessImAssetService.getAssetCode(orgId);
149
+    }
150
+	
151
+}

+ 103 - 0
src/main/java/com/chinaitop/depot/device/controller/BusinessImPurchaseSaleController.java

@@ -0,0 +1,103 @@
1
+package com.chinaitop.depot.device.controller;
2
+
3
+
4
+import com.chinaitop.depot.device.model.BusinessImAsset;
5
+import com.chinaitop.depot.device.model.BusinessImPurchaseSale;
6
+import com.chinaitop.depot.device.model.param.BusinessImPurchaseSaleAddParam;
7
+import com.chinaitop.depot.device.model.param.BusinessImPurchaseSaleEditParam;
8
+import com.chinaitop.depot.device.model.param.BusinessImPurchaseSalePageParam;
9
+import com.chinaitop.depot.device.service.BusinessImPurchaseSaleService;
10
+import com.fasterxml.jackson.databind.ObjectMapper;
11
+import com.github.pagehelper.Page;
12
+import com.github.pagehelper.PageInfo;
13
+import io.swagger.annotations.Api;
14
+import io.swagger.annotations.ApiImplicitParam;
15
+import io.swagger.annotations.ApiImplicitParams;
16
+import io.swagger.annotations.ApiOperation;
17
+import org.springframework.beans.factory.annotation.Autowired;
18
+import org.springframework.http.MediaType;
19
+import org.springframework.http.ResponseEntity;
20
+import org.springframework.validation.annotation.Validated;
21
+import org.springframework.web.bind.annotation.*;
22
+
23
+import java.io.IOException;
24
+import java.util.HashMap;
25
+import java.util.Map;
26
+
27
+/**
28
+ * <p>
29
+ * 智能管理-综合业务管理-采购销售管理表 前端控制器
30
+ * </p>
31
+ *
32
+ * @author root
33
+ * @since 2024-06-06
34
+ */
35
+@RestController
36
+@RequestMapping("/business-im-purchase-sale")
37
+@Api(value= "BusinessImPurchaseSaleController", description = "综合业务管理-采购销售管理")
38
+@CrossOrigin
39
+public class BusinessImPurchaseSaleController {
40
+
41
+    @Autowired
42
+    private BusinessImPurchaseSaleService businessImPurchaseSaleService;
43
+
44
+    @GetMapping("/getList")
45
+    @ApiOperation(value = "查询 采购销售管理 信息列表", notes = "查询 采购销售管理 信息列表")
46
+    public ResponseEntity<PageInfo<BusinessImPurchaseSale>> getList( BusinessImPurchaseSalePageParam pageParam) {
47
+
48
+        return ResponseEntity.ok(businessImPurchaseSaleService.getList(pageParam));
49
+    }
50
+
51
+/*    @PostMapping("/saveAndUpdate")
52
+    @ApiOperation(value="采购销售管理-保存/修改", notes = "保存/修改")
53
+    public Map<String, Object> save(@RequestBody String businessImPurchaseSaleJson) {
54
+        Map<String, Object> modelMap = new HashMap<>();
55
+        // JSON字符串转对象
56
+        ObjectMapper mapper = new ObjectMapper();
57
+        String replace = businessImPurchaseSaleJson.replace("+", " ");
58
+        try {
59
+            BusinessImPurchaseSale businessImPurchaseSale = (BusinessImPurchaseSale)mapper.readValue(replace, BusinessImPurchaseSale.class);
60
+            businessImPurchaseSaleService.saveOrUpdateBusinessImPurchaseSale(businessImPurchaseSale);
61
+            modelMap.put("status", "success");
62
+        } catch (IOException e) {
63
+            modelMap.put("status", "error");
64
+            modelMap.put("msg", "保存/修改失败!");
65
+            e.printStackTrace();
66
+        }
67
+        return modelMap;
68
+    }*/
69
+
70
+    @PostMapping("/saveAndUpdate")
71
+    @ApiOperation(value="采购销售管理-保存/修改", notes = "保存/修改")
72
+    public Map<String, Object> save(@RequestBody BusinessImPurchaseSale businessImPurchaseSale) {
73
+        Map<String, Object> modelMap = new HashMap<>();
74
+        try {
75
+            businessImPurchaseSaleService.saveOrUpdateBusinessImPurchaseSale(businessImPurchaseSale);
76
+            modelMap.put("status", "success");
77
+        } catch (Exception e) {
78
+            modelMap.put("status", "error");
79
+            modelMap.put("msg", "保存/修改失败!");
80
+            e.printStackTrace();
81
+        }
82
+        return modelMap;
83
+    }
84
+
85
+  /*  @PutMapping("/update")
86
+    @ApiOperation(value = "采购销售管理-修改", notes = "修改")
87
+    public ResponseEntity update(@Validated @RequestBody BusinessImPurchaseSaleEditParam param) {
88
+        return ResponseEntity.ok(businessImPurchaseSaleService.updateData(param));
89
+    }*/
90
+
91
+    @DeleteMapping("/delete/{id}")
92
+    @ApiOperation(value = "采购销售管理-删除", notes = "id删除")
93
+    public ResponseEntity delete(@PathVariable("id") String id) {
94
+        return ResponseEntity.ok(businessImPurchaseSaleService.deleteData(id));
95
+    }
96
+
97
+    @GetMapping("/getById")
98
+    @ApiOperation(value = "采购销售管理-详情", notes = "id获取详情")
99
+    public ResponseEntity<BusinessImPurchaseSale> getById(String id) {
100
+        return ResponseEntity.ok(businessImPurchaseSaleService.getById(id));
101
+    }
102
+
103
+}

+ 6 - 13
src/main/java/com/chinaitop/depot/device/controller/DFacilitiesController.java

@@ -4,8 +4,6 @@ import com.chinaitop.depot.device.model.*;
4 4
 import com.chinaitop.depot.device.service.DFacilitiesBasicsService;
5 5
 import com.chinaitop.depot.device.service.DFacilitiesMaintainService;
6 6
 import com.chinaitop.depot.device.service.DFacilitiesRepairService;
7
-import com.chinaitop.depot.device.service.DSblxxjyService;
8
-import com.chinaitop.depot.utils.GeneratingEncodUtils;
9 7
 import com.fasterxml.jackson.databind.ObjectMapper;
10 8
 import com.github.pagehelper.PageHelper;
11 9
 import com.github.pagehelper.PageInfo;
@@ -13,8 +11,8 @@ import io.swagger.annotations.Api;
13 11
 import io.swagger.annotations.ApiImplicitParam;
14 12
 import io.swagger.annotations.ApiImplicitParams;
15 13
 import io.swagger.annotations.ApiOperation;
16
-import org.apache.commons.lang.StringUtils;
17 14
 import org.springframework.http.MediaType;
15
+import org.springframework.web.bind.annotation.RequestBody;
18 16
 import org.springframework.web.bind.annotation.RequestMapping;
19 17
 import org.springframework.web.bind.annotation.RequestMethod;
20 18
 import org.springframework.web.bind.annotation.RestController;
@@ -24,7 +22,6 @@ import java.util.Date;
24 22
 import java.util.HashMap;
25 23
 import java.util.List;
26 24
 import java.util.Map;
27
-import java.util.stream.Collectors;
28 25
 
29 26
 /**
30 27
  * @author yu.ren
@@ -76,17 +73,13 @@ public class DFacilitiesController {
76 73
         return pageInfo;
77 74
     }
78 75
 
79
-    @RequestMapping(value = "/basics/save", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.POST)
76
+
77
+    @RequestMapping(value="/basics/save", produces = MediaType.APPLICATION_JSON_VALUE, method=RequestMethod.POST)
80 78
     @ApiOperation(value = "保存/编辑设施基础信息", notes = "设施基础信息")
81
-    @ApiImplicitParams({
82
-            @ApiImplicitParam(name = "dFacilitiesBasicsJson", value = "设施基础信息数据", paramType = "form")
83
-    })
84
-    public Map<String, Object> saveBasics(String dFacilitiesBasicsJson) {
79
+   
80
+    public Map<String, Object> saveBasics(@RequestBody DFacilitiesBasics dFacilitiesBasics) {
85 81
         Map<String, Object> modelMap = new HashMap<>();
86
-        // JSON字符串转对象
87
-        ObjectMapper mapper = new ObjectMapper();
88 82
         try {
89
-            DFacilitiesBasics dFacilitiesBasics = mapper.readValue(dFacilitiesBasicsJson, DFacilitiesBasics.class);
90 83
             if (dFacilitiesBasics.getId()==null) {
91 84
                 dFacilitiesBasics.setCreateTime(new Date()); // 创建时间
92 85
                 dFacilitiesBasicsService.save(dFacilitiesBasics); // 新增
@@ -207,7 +200,7 @@ public class DFacilitiesController {
207 200
     @RequestMapping(value = "/maintain/save", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.POST)
208 201
     @ApiOperation(value = "保存/编辑设施保养信息", notes = "设施保养信息")
209 202
     @ApiImplicitParams({
210
-            @ApiImplicitParam(name = "dFacilitiesMaintainJson", value = "设施保养信息", paramType = "form")
203
+            @ApiImplicitParam(name = "dFacilitiesMaintainJson", value = "设施保养信息", paramType = "query")
211 204
     })
212 205
     public Map<String, Object> saveMaintain(String dFacilitiesMaintainJson) {
213 206
         Map<String, Object> modelMap = new HashMap<>();

+ 30 - 0
src/main/java/com/chinaitop/depot/device/mapper/BusinessImAssetMapper.java

@@ -0,0 +1,30 @@
1
+package com.chinaitop.depot.device.mapper;
2
+
3
+import com.chinaitop.depot.device.model.BusinessImAsset;
4
+import com.chinaitop.depot.device.model.BusinessImAssetExample;
5
+import java.util.List;
6
+import org.apache.ibatis.annotations.Param;
7
+
8
+public interface BusinessImAssetMapper {
9
+    int countByExample(BusinessImAssetExample example);
10
+
11
+    int deleteByExample(BusinessImAssetExample example);
12
+
13
+    int deleteByPrimaryKey(Integer id);
14
+
15
+    int insert(BusinessImAsset record);
16
+
17
+    int insertSelective(BusinessImAsset record);
18
+
19
+    List<BusinessImAsset> selectByExample(BusinessImAssetExample example);
20
+
21
+    BusinessImAsset selectByPrimaryKey(Integer id);
22
+
23
+    int updateByExampleSelective(@Param("record") BusinessImAsset record, @Param("example") BusinessImAssetExample example);
24
+
25
+    int updateByExample(@Param("record") BusinessImAsset record, @Param("example") BusinessImAssetExample example);
26
+
27
+    int updateByPrimaryKeySelective(BusinessImAsset record);
28
+
29
+    int updateByPrimaryKey(BusinessImAsset record);
30
+}

+ 338 - 0
src/main/java/com/chinaitop/depot/device/mapper/BusinessImAssetMapper.xml

@@ -0,0 +1,338 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
+<mapper namespace="com.chinaitop.depot.device.mapper.BusinessImAssetMapper" >
4
+  <resultMap id="BaseResultMap" type="com.chinaitop.depot.device.model.BusinessImAsset" >
5
+    <id column="id" property="id" jdbcType="INTEGER" />
6
+    <result column="createname" property="createname" jdbcType="VARCHAR" />
7
+    <result column="createdate" property="createdate" jdbcType="TIMESTAMP" />
8
+    <result column="updatename" property="updatename" jdbcType="VARCHAR" />
9
+    <result column="updatedate" property="updatedate" jdbcType="TIMESTAMP" />
10
+    <result column="org_id" property="orgId" jdbcType="INTEGER" />
11
+    <result column="asset_code" property="assetCode" jdbcType="VARCHAR" />
12
+    <result column="asset_status" property="assetStatus" jdbcType="TINYINT" />
13
+    <result column="asset_category" property="assetCategory" jdbcType="TINYINT" />
14
+    <result column="asset_name" property="assetName" jdbcType="VARCHAR" />
15
+    <result column="specification_model" property="specificationModel" jdbcType="VARCHAR" />
16
+    <result column="serial_number" property="serialNumber" jdbcType="VARCHAR" />
17
+    <result column="user_personnel" property="userPersonnel" jdbcType="VARCHAR" />
18
+  </resultMap>
19
+  <sql id="Example_Where_Clause" >
20
+    <where >
21
+      <foreach collection="oredCriteria" item="criteria" separator="or" >
22
+        <if test="criteria.valid" >
23
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
24
+            <foreach collection="criteria.criteria" item="criterion" >
25
+              <choose >
26
+                <when test="criterion.noValue" >
27
+                  and ${criterion.condition}
28
+                </when>
29
+                <when test="criterion.singleValue" >
30
+                  and ${criterion.condition} #{criterion.value}
31
+                </when>
32
+                <when test="criterion.betweenValue" >
33
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
34
+                </when>
35
+                <when test="criterion.listValue" >
36
+                  and ${criterion.condition}
37
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
38
+                    #{listItem}
39
+                  </foreach>
40
+                </when>
41
+              </choose>
42
+            </foreach>
43
+          </trim>
44
+        </if>
45
+      </foreach>
46
+    </where>
47
+  </sql>
48
+  <sql id="Update_By_Example_Where_Clause" >
49
+    <where >
50
+      <foreach collection="example.oredCriteria" item="criteria" separator="or" >
51
+        <if test="criteria.valid" >
52
+          <trim prefix="(" suffix=")" prefixOverrides="and" >
53
+            <foreach collection="criteria.criteria" item="criterion" >
54
+              <choose >
55
+                <when test="criterion.noValue" >
56
+                  and ${criterion.condition}
57
+                </when>
58
+                <when test="criterion.singleValue" >
59
+                  and ${criterion.condition} #{criterion.value}
60
+                </when>
61
+                <when test="criterion.betweenValue" >
62
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
63
+                </when>
64
+                <when test="criterion.listValue" >
65
+                  and ${criterion.condition}
66
+                  <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
67
+                    #{listItem}
68
+                  </foreach>
69
+                </when>
70
+              </choose>
71
+            </foreach>
72
+          </trim>
73
+        </if>
74
+      </foreach>
75
+    </where>
76
+  </sql>
77
+  <sql id="Base_Column_List" >
78
+    id, createname, createdate, updatename, updatedate, org_id, asset_code, asset_status, 
79
+    asset_category, asset_name, specification_model, serial_number, user_personnel
80
+  </sql>
81
+  <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.device.model.BusinessImAssetExample" >
82
+    select
83
+    <if test="distinct" >
84
+      distinct
85
+    </if>
86
+    <include refid="Base_Column_List" />
87
+    from business_im_asset
88
+    <if test="_parameter != null" >
89
+      <include refid="Example_Where_Clause" />
90
+    </if>
91
+    <if test="orderByClause != null" >
92
+      order by ${orderByClause}
93
+    </if>
94
+  </select>
95
+  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
96
+    select 
97
+    <include refid="Base_Column_List" />
98
+    from business_im_asset
99
+    where id = #{id,jdbcType=INTEGER}
100
+  </select>
101
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
102
+    delete from business_im_asset
103
+    where id = #{id,jdbcType=INTEGER}
104
+  </delete>
105
+  <delete id="deleteByExample" parameterType="com.chinaitop.depot.device.model.BusinessImAssetExample" >
106
+    delete from business_im_asset
107
+    <if test="_parameter != null" >
108
+      <include refid="Example_Where_Clause" />
109
+    </if>
110
+  </delete>
111
+  <insert id="insert" parameterType="com.chinaitop.depot.device.model.BusinessImAsset" >
112
+    insert into business_im_asset (id, createname, createdate, 
113
+      updatename, updatedate, org_id, 
114
+      asset_code, asset_status, asset_category, 
115
+      asset_name, specification_model, serial_number, 
116
+      user_personnel)
117
+    values (#{id,jdbcType=INTEGER}, #{createname,jdbcType=VARCHAR}, #{createdate,jdbcType=TIMESTAMP}, 
118
+      #{updatename,jdbcType=VARCHAR}, #{updatedate,jdbcType=TIMESTAMP}, #{orgId,jdbcType=INTEGER}, 
119
+      #{assetCode,jdbcType=VARCHAR}, #{assetStatus,jdbcType=TINYINT}, #{assetCategory,jdbcType=TINYINT}, 
120
+      #{assetName,jdbcType=VARCHAR}, #{specificationModel,jdbcType=VARCHAR}, #{serialNumber,jdbcType=VARCHAR}, 
121
+      #{userPersonnel,jdbcType=VARCHAR})
122
+  </insert>
123
+  <insert id="insertSelective" parameterType="com.chinaitop.depot.device.model.BusinessImAsset" >
124
+    insert into business_im_asset
125
+    <trim prefix="(" suffix=")" suffixOverrides="," >
126
+      <if test="id != null" >
127
+        id,
128
+      </if>
129
+      <if test="createname != null" >
130
+        createname,
131
+      </if>
132
+      <if test="createdate != null" >
133
+        createdate,
134
+      </if>
135
+      <if test="updatename != null" >
136
+        updatename,
137
+      </if>
138
+      <if test="updatedate != null" >
139
+        updatedate,
140
+      </if>
141
+      <if test="orgId != null" >
142
+        org_id,
143
+      </if>
144
+      <if test="assetCode != null" >
145
+        asset_code,
146
+      </if>
147
+      <if test="assetStatus != null" >
148
+        asset_status,
149
+      </if>
150
+      <if test="assetCategory != null" >
151
+        asset_category,
152
+      </if>
153
+      <if test="assetName != null" >
154
+        asset_name,
155
+      </if>
156
+      <if test="specificationModel != null" >
157
+        specification_model,
158
+      </if>
159
+      <if test="serialNumber != null" >
160
+        serial_number,
161
+      </if>
162
+      <if test="userPersonnel != null" >
163
+        user_personnel,
164
+      </if>
165
+    </trim>
166
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
167
+      <if test="id != null" >
168
+        #{id,jdbcType=INTEGER},
169
+      </if>
170
+      <if test="createname != null" >
171
+        #{createname,jdbcType=VARCHAR},
172
+      </if>
173
+      <if test="createdate != null" >
174
+        #{createdate,jdbcType=TIMESTAMP},
175
+      </if>
176
+      <if test="updatename != null" >
177
+        #{updatename,jdbcType=VARCHAR},
178
+      </if>
179
+      <if test="updatedate != null" >
180
+        #{updatedate,jdbcType=TIMESTAMP},
181
+      </if>
182
+      <if test="orgId != null" >
183
+        #{orgId,jdbcType=INTEGER},
184
+      </if>
185
+      <if test="assetCode != null" >
186
+        #{assetCode,jdbcType=VARCHAR},
187
+      </if>
188
+      <if test="assetStatus != null" >
189
+        #{assetStatus,jdbcType=TINYINT},
190
+      </if>
191
+      <if test="assetCategory != null" >
192
+        #{assetCategory,jdbcType=TINYINT},
193
+      </if>
194
+      <if test="assetName != null" >
195
+        #{assetName,jdbcType=VARCHAR},
196
+      </if>
197
+      <if test="specificationModel != null" >
198
+        #{specificationModel,jdbcType=VARCHAR},
199
+      </if>
200
+      <if test="serialNumber != null" >
201
+        #{serialNumber,jdbcType=VARCHAR},
202
+      </if>
203
+      <if test="userPersonnel != null" >
204
+        #{userPersonnel,jdbcType=VARCHAR},
205
+      </if>
206
+    </trim>
207
+  </insert>
208
+  <select id="countByExample" parameterType="com.chinaitop.depot.device.model.BusinessImAssetExample" resultType="java.lang.Integer" >
209
+    select count(*) from business_im_asset
210
+    <if test="_parameter != null" >
211
+      <include refid="Example_Where_Clause" />
212
+    </if>
213
+  </select>
214
+  <update id="updateByExampleSelective" parameterType="map" >
215
+    update business_im_asset
216
+    <set >
217
+      <if test="record.id != null" >
218
+        id = #{record.id,jdbcType=INTEGER},
219
+      </if>
220
+      <if test="record.createname != null" >
221
+        createname = #{record.createname,jdbcType=VARCHAR},
222
+      </if>
223
+      <if test="record.createdate != null" >
224
+        createdate = #{record.createdate,jdbcType=TIMESTAMP},
225
+      </if>
226
+      <if test="record.updatename != null" >
227
+        updatename = #{record.updatename,jdbcType=VARCHAR},
228
+      </if>
229
+      <if test="record.updatedate != null" >
230
+        updatedate = #{record.updatedate,jdbcType=TIMESTAMP},
231
+      </if>
232
+      <if test="record.orgId != null" >
233
+        org_id = #{record.orgId,jdbcType=INTEGER},
234
+      </if>
235
+      <if test="record.assetCode != null" >
236
+        asset_code = #{record.assetCode,jdbcType=VARCHAR},
237
+      </if>
238
+      <if test="record.assetStatus != null" >
239
+        asset_status = #{record.assetStatus,jdbcType=TINYINT},
240
+      </if>
241
+      <if test="record.assetCategory != null" >
242
+        asset_category = #{record.assetCategory,jdbcType=TINYINT},
243
+      </if>
244
+      <if test="record.assetName != null" >
245
+        asset_name = #{record.assetName,jdbcType=VARCHAR},
246
+      </if>
247
+      <if test="record.specificationModel != null" >
248
+        specification_model = #{record.specificationModel,jdbcType=VARCHAR},
249
+      </if>
250
+      <if test="record.serialNumber != null" >
251
+        serial_number = #{record.serialNumber,jdbcType=VARCHAR},
252
+      </if>
253
+      <if test="record.userPersonnel != null" >
254
+        user_personnel = #{record.userPersonnel,jdbcType=VARCHAR},
255
+      </if>
256
+    </set>
257
+    <if test="_parameter != null" >
258
+      <include refid="Update_By_Example_Where_Clause" />
259
+    </if>
260
+  </update>
261
+  <update id="updateByExample" parameterType="map" >
262
+    update business_im_asset
263
+    set id = #{record.id,jdbcType=INTEGER},
264
+      createname = #{record.createname,jdbcType=VARCHAR},
265
+      createdate = #{record.createdate,jdbcType=TIMESTAMP},
266
+      updatename = #{record.updatename,jdbcType=VARCHAR},
267
+      updatedate = #{record.updatedate,jdbcType=TIMESTAMP},
268
+      org_id = #{record.orgId,jdbcType=INTEGER},
269
+      asset_code = #{record.assetCode,jdbcType=VARCHAR},
270
+      asset_status = #{record.assetStatus,jdbcType=TINYINT},
271
+      asset_category = #{record.assetCategory,jdbcType=TINYINT},
272
+      asset_name = #{record.assetName,jdbcType=VARCHAR},
273
+      specification_model = #{record.specificationModel,jdbcType=VARCHAR},
274
+      serial_number = #{record.serialNumber,jdbcType=VARCHAR},
275
+      user_personnel = #{record.userPersonnel,jdbcType=VARCHAR}
276
+    <if test="_parameter != null" >
277
+      <include refid="Update_By_Example_Where_Clause" />
278
+    </if>
279
+  </update>
280
+  <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.device.model.BusinessImAsset" >
281
+    update business_im_asset
282
+    <set >
283
+      <if test="createname != null" >
284
+        createname = #{createname,jdbcType=VARCHAR},
285
+      </if>
286
+      <if test="createdate != null" >
287
+        createdate = #{createdate,jdbcType=TIMESTAMP},
288
+      </if>
289
+      <if test="updatename != null" >
290
+        updatename = #{updatename,jdbcType=VARCHAR},
291
+      </if>
292
+      <if test="updatedate != null" >
293
+        updatedate = #{updatedate,jdbcType=TIMESTAMP},
294
+      </if>
295
+      <if test="orgId != null" >
296
+        org_id = #{orgId,jdbcType=INTEGER},
297
+      </if>
298
+      <if test="assetCode != null" >
299
+        asset_code = #{assetCode,jdbcType=VARCHAR},
300
+      </if>
301
+      <if test="assetStatus != null" >
302
+        asset_status = #{assetStatus,jdbcType=TINYINT},
303
+      </if>
304
+      <if test="assetCategory != null" >
305
+        asset_category = #{assetCategory,jdbcType=TINYINT},
306
+      </if>
307
+      <if test="assetName != null" >
308
+        asset_name = #{assetName,jdbcType=VARCHAR},
309
+      </if>
310
+      <if test="specificationModel != null" >
311
+        specification_model = #{specificationModel,jdbcType=VARCHAR},
312
+      </if>
313
+      <if test="serialNumber != null" >
314
+        serial_number = #{serialNumber,jdbcType=VARCHAR},
315
+      </if>
316
+      <if test="userPersonnel != null" >
317
+        user_personnel = #{userPersonnel,jdbcType=VARCHAR},
318
+      </if>
319
+    </set>
320
+    where id = #{id,jdbcType=INTEGER}
321
+  </update>
322
+  <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.device.model.BusinessImAsset" >
323
+    update business_im_asset
324
+    set createname = #{createname,jdbcType=VARCHAR},
325
+      createdate = #{createdate,jdbcType=TIMESTAMP},
326
+      updatename = #{updatename,jdbcType=VARCHAR},
327
+      updatedate = #{updatedate,jdbcType=TIMESTAMP},
328
+      org_id = #{orgId,jdbcType=INTEGER},
329
+      asset_code = #{assetCode,jdbcType=VARCHAR},
330
+      asset_status = #{assetStatus,jdbcType=TINYINT},
331
+      asset_category = #{assetCategory,jdbcType=TINYINT},
332
+      asset_name = #{assetName,jdbcType=VARCHAR},
333
+      specification_model = #{specificationModel,jdbcType=VARCHAR},
334
+      serial_number = #{serialNumber,jdbcType=VARCHAR},
335
+      user_personnel = #{userPersonnel,jdbcType=VARCHAR}
336
+    where id = #{id,jdbcType=INTEGER}
337
+  </update>
338
+</mapper>

+ 37 - 0
src/main/java/com/chinaitop/depot/device/mapper/BusinessImPurchaseSaleMapper.java

@@ -0,0 +1,37 @@
1
+package com.chinaitop.depot.device.mapper;
2
+
3
+
4
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5
+import com.chinaitop.depot.device.model.BusinessImPurchaseSale;
6
+import com.github.pagehelper.Page;
7
+import org.apache.ibatis.annotations.Mapper;
8
+import org.apache.ibatis.annotations.Param;
9
+
10
+import java.util.List;
11
+
12
+/**
13
+ * <p>
14
+ * 智能管理-综合业务管理-采购销售管理表 Mapper 接口
15
+ * </p>
16
+ *
17
+ * @author root
18
+ * @since 2024-06-06
19
+ */
20
+@Mapper
21
+public interface BusinessImPurchaseSaleMapper extends BaseMapper<BusinessImPurchaseSale> {
22
+
23
+    List<BusinessImPurchaseSale> getList(@Param("purchaseCode") String purchaseCode,
24
+                                         @Param("purchasePlanName") String purchasePlanName,
25
+                                         @Param("orgId") Integer orgId);
26
+
27
+    //int insertBusinessImPurchaseSale(BusinessImPurchaseSale businessImPurchaseSale);
28
+
29
+
30
+    /**
31
+     * @author: hujianchun
32
+     * @Description:
33
+     * @param:
34
+     * @return: 采购销售管理-详情
35
+     */
36
+    BusinessImPurchaseSale getById(String id);
37
+}

+ 59 - 0
src/main/java/com/chinaitop/depot/device/mapper/BusinessImPurchaseSaleMapper.xml

@@ -0,0 +1,59 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.chinaitop.depot.device.mapper.BusinessImPurchaseSaleMapper">
4
+
5
+    <!-- 通用查询映射结果 -->
6
+    <resultMap id="BaseResultMap" type="com.chinaitop.depot.device.model.BusinessImPurchaseSale">
7
+        <id column="id" property="id" />
8
+        <result column="createname" property="createname" />
9
+        <result column="createdate" property="createdate" />
10
+        <result column="updatename" property="updatename" />
11
+        <result column="updatedate" property="updatedate" />
12
+        <result column="org_id" property="orgId" />
13
+        <result column="purchase_code" property="purchaseCode" />
14
+        <result column="purchase_plan_name" property="purchasePlanName" />
15
+        <result column="purchase_department" property="purchaseDepartment" />
16
+        <result column="purchase_personnel" property="purchasePersonnel" />
17
+        <result column="contact_information" property="contactInformation" />
18
+        <result column="purchase_request_time" property="purchaseRequestTime" />
19
+        <result column="purchase_status" property="purchaseStatus" />
20
+        <result column="purchase_commodity" property="purchaseCommodity" />
21
+        <result column="purchase_amount" property="purchaseAmount" />
22
+        <result column="purchase_quantity" property="purchaseQuantity" />
23
+        <result column="purchase_unit_price" property="purchaseUnitPrice" />
24
+    </resultMap>
25
+
26
+    <!-- 通用查询结果列 -->
27
+    <sql id="Base_Column_List">
28
+        id, createname, createdate, updatename, updatedate, org_id, purchase_code, purchase_plan_name, purchase_department, purchase_personnel, contact_information, purchase_request_time, purchase_status, purchase_commodity, purchase_amount, purchase_quantity, purchase_unit_price
29
+    </sql>
30
+
31
+    <insert id="insertBusinessImPurchaseSale">
32
+        insert into business_im_purchase_sale
33
+        values (#{id}, #{createname}, #{createdate}, #{updatename}, #{updatedate}, #{org_id},
34
+                #{purchase_code}, #{purchase_plan_name}, #{purchase_department}, #{purchase_personnel},
35
+                #{contact_information}, #{purchase_request_time}, #{purchase_status}, #{purchase_commodity},
36
+                #{purchase_amount}, #{purchase_quantity}, #{purchase_unit_price})
37
+    </insert>
38
+
39
+
40
+    <select id="getList" resultType="com.chinaitop.depot.device.model.BusinessImPurchaseSale">
41
+        select * from business_im_purchase_sale
42
+        <where>
43
+            org_id in (#{orgId})
44
+            <if test="purchaseCode!=null and purchaseCode!=''">
45
+                and purchase_code like concat("%",#{purchaseCode},"%")
46
+            </if>
47
+            <if test="purchasePlanName!=null and purchasePlanName!=''">
48
+                and purchase_plan_name like concat("%",#{purchasePlanName},"%")
49
+            </if>
50
+        </where>
51
+        order by createdate desc
52
+    </select>
53
+
54
+
55
+    <select id="getById" resultType="com.chinaitop.depot.device.model.BusinessImPurchaseSale">
56
+        select * from business_im_purchase_sale where id=#{id}
57
+    </select>
58
+
59
+</mapper>

+ 239 - 0
src/main/java/com/chinaitop/depot/device/model/BusinessImAsset.java

@@ -0,0 +1,239 @@
1
+package com.chinaitop.depot.device.model;
2
+
3
+import java.util.Date;
4
+
5
+public class BusinessImAsset {
6
+    private Integer id;
7
+
8
+    private String createname;
9
+
10
+    private Date createdate;
11
+
12
+    private String updatename;
13
+
14
+    private Date updatedate;
15
+
16
+    private Integer orgId;
17
+
18
+    private String assetCode;
19
+
20
+    private Integer assetStatus;
21
+
22
+    private Integer assetCategory;
23
+
24
+    private String assetName;
25
+
26
+    private String specificationModel;
27
+
28
+    private String serialNumber;
29
+
30
+    private String userPersonnel;
31
+
32
+    /**
33
+     * 主键ID
34
+     * @return id 主键ID
35
+     */
36
+    public Integer getId() {
37
+        return id;
38
+    }
39
+
40
+    /**
41
+     * 主键ID
42
+     * @param id 主键ID
43
+     */
44
+    public void setId(Integer id) {
45
+        this.id = id;
46
+    }
47
+
48
+    /**
49
+     * 创建人
50
+     * @return createname 创建人
51
+     */
52
+    public String getCreatename() {
53
+        return createname;
54
+    }
55
+
56
+    /**
57
+     * 创建人
58
+     * @param createname 创建人
59
+     */
60
+    public void setCreatename(String createname) {
61
+        this.createname = createname == null ? null : createname.trim();
62
+    }
63
+
64
+    /**
65
+     * 创建日期
66
+     * @return createdate 创建日期
67
+     */
68
+    public Date getCreatedate() {
69
+        return createdate;
70
+    }
71
+
72
+    /**
73
+     * 创建日期
74
+     * @param createdate 创建日期
75
+     */
76
+    public void setCreatedate(Date createdate) {
77
+        this.createdate = createdate;
78
+    }
79
+
80
+    /**
81
+     * 更新人
82
+     * @return updatename 更新人
83
+     */
84
+    public String getUpdatename() {
85
+        return updatename;
86
+    }
87
+
88
+    /**
89
+     * 更新人
90
+     * @param updatename 更新人
91
+     */
92
+    public void setUpdatename(String updatename) {
93
+        this.updatename = updatename == null ? null : updatename.trim();
94
+    }
95
+
96
+    /**
97
+     * 更新日期
98
+     * @return updatedate 更新日期
99
+     */
100
+    public Date getUpdatedate() {
101
+        return updatedate;
102
+    }
103
+
104
+    /**
105
+     * 更新日期
106
+     * @param updatedate 更新日期
107
+     */
108
+    public void setUpdatedate(Date updatedate) {
109
+        this.updatedate = updatedate;
110
+    }
111
+
112
+    /**
113
+     * 单位id
114
+     * @return org_id 单位id
115
+     */
116
+    public Integer getOrgId() {
117
+        return orgId;
118
+    }
119
+
120
+    /**
121
+     * 单位id
122
+     * @param orgId 单位id
123
+     */
124
+    public void setOrgId(Integer orgId) {
125
+        this.orgId = orgId;
126
+    }
127
+
128
+    /**
129
+     * 资产编号
130
+     * @return asset_code 资产编号
131
+     */
132
+    public String getAssetCode() {
133
+        return assetCode;
134
+    }
135
+
136
+    /**
137
+     * 资产编号
138
+     * @param assetCode 资产编号
139
+     */
140
+    public void setAssetCode(String assetCode) {
141
+        this.assetCode = assetCode == null ? null : assetCode.trim();
142
+    }
143
+
144
+    /**
145
+     * 资产状态,1:正常;2:报废;3:维修;4:投入使用;5:闲置;6:出售;
146
+     * @return asset_status 资产状态,1:正常;2:报废;3:维修;4:投入使用;5:闲置;6:出售;
147
+     */
148
+    public Integer getAssetStatus() {
149
+        return assetStatus;
150
+    }
151
+
152
+    /**
153
+     * 资产状态,1:正常;2:报废;3:维修;4:投入使用;5:闲置;6:出售;
154
+     * @param assetStatus 资产状态,1:正常;2:报废;3:维修;4:投入使用;5:闲置;6:出售;
155
+     */
156
+    public void setAssetStatus(Integer assetStatus) {
157
+        this.assetStatus = assetStatus;
158
+    }
159
+
160
+    /**
161
+     * 资产分类,1:储量设备;2:输送设备;3:清理设备;4:搅拌设备;
162
+     * @return asset_category 资产分类,1:储量设备;2:输送设备;3:清理设备;4:搅拌设备;
163
+     */
164
+    public Integer getAssetCategory() {
165
+        return assetCategory;
166
+    }
167
+
168
+    /**
169
+     * 资产分类,1:储量设备;2:输送设备;3:清理设备;4:搅拌设备;
170
+     * @param assetCategory 资产分类,1:储量设备;2:输送设备;3:清理设备;4:搅拌设备;
171
+     */
172
+    public void setAssetCategory(Integer assetCategory) {
173
+        this.assetCategory = assetCategory;
174
+    }
175
+
176
+    /**
177
+     * 资产名称
178
+     * @return asset_name 资产名称
179
+     */
180
+    public String getAssetName() {
181
+        return assetName;
182
+    }
183
+
184
+    /**
185
+     * 资产名称
186
+     * @param assetName 资产名称
187
+     */
188
+    public void setAssetName(String assetName) {
189
+        this.assetName = assetName == null ? null : assetName.trim();
190
+    }
191
+
192
+    /**
193
+     * 规格型号
194
+     * @return specification_model 规格型号
195
+     */
196
+    public String getSpecificationModel() {
197
+        return specificationModel;
198
+    }
199
+
200
+    /**
201
+     * 规格型号
202
+     * @param specificationModel 规格型号
203
+     */
204
+    public void setSpecificationModel(String specificationModel) {
205
+        this.specificationModel = specificationModel == null ? null : specificationModel.trim();
206
+    }
207
+
208
+    /**
209
+     * 序列号
210
+     * @return serial_number 序列号
211
+     */
212
+    public String getSerialNumber() {
213
+        return serialNumber;
214
+    }
215
+
216
+    /**
217
+     * 序列号
218
+     * @param serialNumber 序列号
219
+     */
220
+    public void setSerialNumber(String serialNumber) {
221
+        this.serialNumber = serialNumber == null ? null : serialNumber.trim();
222
+    }
223
+
224
+    /**
225
+     * 使用人员
226
+     * @return user_personnel 使用人员
227
+     */
228
+    public String getUserPersonnel() {
229
+        return userPersonnel;
230
+    }
231
+
232
+    /**
233
+     * 使用人员
234
+     * @param userPersonnel 使用人员
235
+     */
236
+    public void setUserPersonnel(String userPersonnel) {
237
+        this.userPersonnel = userPersonnel == null ? null : userPersonnel.trim();
238
+    }
239
+}

Dosya farkı çok büyük olduğundan ihmal edildi
+ 1069 - 0
src/main/java/com/chinaitop/depot/device/model/BusinessImAssetExample.java


+ 239 - 0
src/main/java/com/chinaitop/depot/device/model/BusinessImPurchaseSale.java

@@ -0,0 +1,239 @@
1
+package com.chinaitop.depot.device.model;
2
+
3
+
4
+import java.math.BigDecimal;
5
+import java.util.Date;
6
+import java.io.Serializable;
7
+
8
+import com.baomidou.mybatisplus.annotation.IdType;
9
+import com.baomidou.mybatisplus.annotation.TableField;
10
+import com.baomidou.mybatisplus.annotation.TableId;
11
+import com.baomidou.mybatisplus.annotation.TableName;
12
+import com.fasterxml.jackson.annotation.JsonFormat;
13
+import io.swagger.annotations.ApiModel;
14
+import io.swagger.annotations.ApiModelProperty;
15
+import org.springframework.format.annotation.DateTimeFormat;
16
+
17
+
18
+/**
19
+ * <p>
20
+ * 智能管理-综合业务管理-采购销售管理表
21
+ * </p>
22
+ *
23
+ * @author root
24
+ * @since 2024-06-06
25
+ */
26
+@TableName("business_im_purchase_sale")
27
+@ApiModel(value="BusinessImPurchaseSale对象", description="智能管理-综合业务管理-采购销售管理表")
28
+public class BusinessImPurchaseSale implements Serializable {
29
+    private static final long serialVersionUID = 1L;
30
+
31
+    @ApiModelProperty(value = "主键ID")
32
+    @TableId(value = "id", type = IdType.AUTO)
33
+    private Integer id;
34
+
35
+    @ApiModelProperty(value = "创建人")
36
+    @TableField("createname")
37
+    private String createname;
38
+
39
+    @ApiModelProperty(value = "创建日期")
40
+    @TableField("createdate")
41
+    private Date createdate;
42
+
43
+    @ApiModelProperty(value = "更新人")
44
+    @TableField("updatename")
45
+    private String updatename;
46
+
47
+    @ApiModelProperty(value = "更新日期")
48
+    @TableField("updatedate")
49
+    private Date updatedate;
50
+
51
+    @ApiModelProperty(value = "单位id")
52
+    @TableField("org_id")
53
+    private Integer orgId;
54
+
55
+    @ApiModelProperty(value = "采购编号")
56
+    @TableField("purchase_code")
57
+    private String purchaseCode;
58
+
59
+    @ApiModelProperty(value = "采购计划名称")
60
+    @TableField("purchase_plan_name")
61
+    private String purchasePlanName;
62
+
63
+    @ApiModelProperty(value = "采购部门")
64
+    @TableField("purchase_department")
65
+    private String purchaseDepartment;
66
+
67
+    @ApiModelProperty(value = "采购人员")
68
+    @TableField("purchase_personnel")
69
+    private String purchasePersonnel;
70
+
71
+    @ApiModelProperty(value = "联系方式")
72
+    @TableField("contact_information")
73
+    private String contactInformation;
74
+
75
+    @ApiModelProperty(value = "采购申请时间")
76
+    @TableField("purchase_request_time")
77
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:SS")
78
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:SS",timezone="GMT+8")
79
+    private Date purchaseRequestTime;
80
+
81
+    @ApiModelProperty(value = "采购状态,1:未采购;2:采购中;3:采购完成;")
82
+    @TableField("purchase_status")
83
+    private Integer purchaseStatus;
84
+
85
+    @ApiModelProperty(value = "采购商品")
86
+    @TableField("purchase_commodity")
87
+    private String purchaseCommodity;
88
+
89
+    @ApiModelProperty(value = "采购金额(元)")
90
+    @TableField("purchase_amount")
91
+    private BigDecimal purchaseAmount;
92
+
93
+    @ApiModelProperty(value = "采购数量")
94
+    @TableField("purchase_quantity")
95
+    private Integer purchaseQuantity;
96
+
97
+    @ApiModelProperty(value = "采购单价")
98
+    @TableField("purchase_unit_price")
99
+    private BigDecimal purchaseUnitPrice;
100
+
101
+
102
+
103
+
104
+    public Integer getId() {
105
+        return id;
106
+    }
107
+
108
+    public void setId(Integer id) {
109
+        this.id = id;
110
+    }
111
+
112
+    public String getCreatename() {
113
+        return createname;
114
+    }
115
+
116
+    public void setCreatename(String createname) {
117
+        this.createname = createname;
118
+    }
119
+
120
+    public Date getCreatedate() {
121
+        return createdate;
122
+    }
123
+
124
+    public void setCreatedate(Date createdate) {
125
+        this.createdate = createdate;
126
+    }
127
+
128
+    public String getUpdatename() {
129
+        return updatename;
130
+    }
131
+
132
+    public void setUpdatename(String updatename) {
133
+        this.updatename = updatename;
134
+    }
135
+
136
+    public Date getUpdatedate() {
137
+        return updatedate;
138
+    }
139
+
140
+    public void setUpdatedate(Date updatedate) {
141
+        this.updatedate = updatedate;
142
+    }
143
+
144
+    public Integer getOrgId() {
145
+        return orgId;
146
+    }
147
+
148
+    public void setOrgId(Integer orgId) {
149
+        this.orgId = orgId;
150
+    }
151
+
152
+    public String getPurchaseCode() {
153
+        return purchaseCode;
154
+    }
155
+
156
+    public void setPurchaseCode(String purchaseCode) {
157
+        this.purchaseCode = purchaseCode;
158
+    }
159
+
160
+    public String getPurchasePlanName() {
161
+        return purchasePlanName;
162
+    }
163
+
164
+    public void setPurchasePlanName(String purchasePlanName) {
165
+        this.purchasePlanName = purchasePlanName;
166
+    }
167
+
168
+    public String getPurchaseDepartment() {
169
+        return purchaseDepartment;
170
+    }
171
+
172
+    public void setPurchaseDepartment(String purchaseDepartment) {
173
+        this.purchaseDepartment = purchaseDepartment;
174
+    }
175
+
176
+    public String getPurchasePersonnel() {
177
+        return purchasePersonnel;
178
+    }
179
+
180
+    public void setPurchasePersonnel(String purchasePersonnel) {
181
+        this.purchasePersonnel = purchasePersonnel;
182
+    }
183
+
184
+    public String getContactInformation() {
185
+        return contactInformation;
186
+    }
187
+
188
+    public void setContactInformation(String contactInformation) {
189
+        this.contactInformation = contactInformation;
190
+    }
191
+
192
+    public Date getPurchaseRequestTime() {
193
+        return purchaseRequestTime;
194
+    }
195
+
196
+    public void setPurchaseRequestTime(Date purchaseRequestTime) {
197
+        this.purchaseRequestTime = purchaseRequestTime;
198
+    }
199
+
200
+    public Integer getPurchaseStatus() {
201
+        return purchaseStatus;
202
+    }
203
+
204
+    public void setPurchaseStatus(Integer purchaseStatus) {
205
+        this.purchaseStatus = purchaseStatus;
206
+    }
207
+
208
+    public String getPurchaseCommodity() {
209
+        return purchaseCommodity;
210
+    }
211
+
212
+    public void setPurchaseCommodity(String purchaseCommodity) {
213
+        this.purchaseCommodity = purchaseCommodity;
214
+    }
215
+
216
+    public BigDecimal getPurchaseAmount() {
217
+        return purchaseAmount;
218
+    }
219
+
220
+    public void setPurchaseAmount(BigDecimal purchaseAmount) {
221
+        this.purchaseAmount = purchaseAmount;
222
+    }
223
+
224
+    public Integer getPurchaseQuantity() {
225
+        return purchaseQuantity;
226
+    }
227
+
228
+    public void setPurchaseQuantity(Integer purchaseQuantity) {
229
+        this.purchaseQuantity = purchaseQuantity;
230
+    }
231
+
232
+    public BigDecimal getPurchaseUnitPrice() {
233
+        return purchaseUnitPrice;
234
+    }
235
+
236
+    public void setPurchaseUnitPrice(BigDecimal purchaseUnitPrice) {
237
+        this.purchaseUnitPrice = purchaseUnitPrice;
238
+    }
239
+}

+ 7 - 0
src/main/java/com/chinaitop/depot/device/model/DFacilitiesBasics.java

@@ -4,6 +4,8 @@ import com.fasterxml.jackson.annotation.JsonFormat;
4 4
 
5 5
 import java.util.Date;
6 6
 
7
+import org.springframework.format.annotation.DateTimeFormat;
8
+
7 9
 public class DFacilitiesBasics {
8 10
     private Integer id;
9 11
 
@@ -31,30 +33,35 @@ public class DFacilitiesBasics {
31 33
      * 安装时间
32 34
      */
33 35
     @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
36
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
34 37
     private Date azsj;
35 38
 
36 39
     /**
37 40
      * 调试时间
38 41
      */
39 42
     @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
43
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
40 44
     private Date tssj;
41 45
 
42 46
     /**
43 47
      * 验收时间
44 48
      */
45 49
     @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
50
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
46 51
     private Date yssj;
47 52
 
48 53
 
49 54
     private Integer orgId;
50 55
 
51 56
     @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
57
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
52 58
     private Date createTime;
53 59
 
54 60
     /**
55 61
      * 报废日期
56 62
      */
57 63
     @JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")
64
+    @DateTimeFormat(pattern="yyyy-MM-dd")
58 65
     private Date bfrq;
59 66
 
60 67
     /**

+ 262 - 0
src/main/java/com/chinaitop/depot/device/model/param/BusinessImPurchaseSaleAddParam.java

@@ -0,0 +1,262 @@
1
+/*
2
+ * Copyright [2022] [https://www.xiaonuo.vip]
3
+ *
4
+ * Snowy采用APACHE LICENSE 2.0开源协议,您在使用过程中,需要注意以下几点:
5
+ *
6
+ * 1.请不要删除和修改根目录下的LICENSE文件。
7
+ * 2.请不要删除和修改Snowy源码头部的版权声明。
8
+ * 3.本项目代码可免费商业使用,商业使用请保留源码和相关描述文件的项目出处,作者声明等。
9
+ * 4.分发源码时候,请注明软件出处 https://www.xiaonuo.vip
10
+ * 5.不可二次分发开源参与同类竞品,如有想法可联系团队xiaonuobase@qq.com商议合作。
11
+ * 6.若您的项目无法满足以上几点,需要更多功能代码,获取Snowy商业授权许可,请在官网购买授权,地址为 https://www.xiaonuo.vip
12
+ */
13
+package com.chinaitop.depot.device.model.param;
14
+
15
+import io.swagger.annotations.ApiModelProperty;
16
+
17
+import javax.validation.constraints.NotBlank;
18
+import javax.validation.constraints.NotNull;
19
+import java.math.BigDecimal;
20
+import java.util.Date;
21
+
22
+/**
23
+ * 综合业务管理-采购销售管理表添加参数
24
+ *
25
+ * @author hjc
26
+ * @date 2024/06/05 21:11
27
+ **/
28
+public class BusinessImPurchaseSaleAddParam {
29
+
30
+    /**
31
+     * 创建人
32
+     */
33
+    @ApiModelProperty(value = "创建人", position = 2)
34
+    private String createname;
35
+
36
+    /**
37
+     * 创建日期
38
+     */
39
+    @ApiModelProperty(value = "创建日期", position = 3)
40
+    private Date createdate;
41
+
42
+    /**
43
+     * 更新人
44
+     */
45
+    @ApiModelProperty(value = "更新人", position = 4)
46
+    private String updatename;
47
+
48
+    /**
49
+     * 更新日期
50
+     */
51
+    @ApiModelProperty(value = "更新日期", position = 5)
52
+    private Date updatedate;
53
+
54
+    /**
55
+     * 单位id
56
+     */
57
+    @ApiModelProperty(value = "单位id", position = 6)
58
+    @NotNull(message = "单位id不能为空")
59
+    private Integer orgId;
60
+
61
+    /**
62
+     * 采购编号
63
+     */
64
+    @ApiModelProperty(value = "采购编号", position = 7)
65
+    private String purchaseCode;
66
+
67
+    /**
68
+     * 采购计划名称
69
+     */
70
+    @ApiModelProperty(value = "采购计划名称", position = 8)
71
+    @NotBlank(message = "采购计划名称不能为空")
72
+    private String purchasePlanName;
73
+
74
+    /**
75
+     * 采购部门
76
+     */
77
+    @ApiModelProperty(value = "采购部门", position = 9)
78
+    @NotBlank(message = "采购部门不能为空")
79
+    private String purchaseDepartment;
80
+
81
+    /**
82
+     * 采购人员
83
+     */
84
+    @ApiModelProperty(value = "采购人员", position = 10)
85
+    @NotBlank(message = "采购人员不能为空")
86
+    private String purchasePersonnel;
87
+
88
+    /**
89
+     * 联系方式
90
+     */
91
+    @ApiModelProperty(value = "联系方式", position = 11)
92
+    @NotBlank(message = "联系方式不能为空")
93
+    private String contactInformation;
94
+
95
+    /**
96
+     * 采购申请时间
97
+     */
98
+    @ApiModelProperty(value = "采购申请时间", position = 12)
99
+    @NotNull(message = "采购时间不能为空")
100
+    private Date purchaseRequestTime;
101
+
102
+    /**
103
+     * 采购状态,1:未采购;2:采购中;3:采购完成;
104
+     */
105
+    @ApiModelProperty(value = "采购状态,1:未采购;2:采购中;3:采购完成;", position = 13)
106
+    @NotNull(message = "采购状态不能为空")
107
+    private Integer purchaseStatus;
108
+
109
+    /**
110
+     * 采购商品
111
+     */
112
+    @ApiModelProperty(value = "采购商品", position = 14)
113
+    private String purchaseCommodity;
114
+
115
+    /**
116
+     * 采购金额(元)
117
+     */
118
+    @ApiModelProperty(value = "采购金额(元)", position = 15)
119
+    @NotNull(message = "采购金额(元)不能为空")
120
+    private BigDecimal purchaseAmount;
121
+
122
+    /**
123
+     * 采购数量
124
+     */
125
+    @ApiModelProperty(value = "采购数量", position = 16)
126
+    private Integer purchaseQuantity;
127
+
128
+    /**
129
+     * 采购单价
130
+     */
131
+    @ApiModelProperty(value = "采购单价", position = 17)
132
+    private BigDecimal purchaseUnitPrice;
133
+
134
+
135
+    public String getCreatename() {
136
+        return createname;
137
+    }
138
+
139
+    public void setCreatename(String createname) {
140
+        this.createname = createname;
141
+    }
142
+
143
+    public Date getCreatedate() {
144
+        return createdate;
145
+    }
146
+
147
+    public void setCreatedate(Date createdate) {
148
+        this.createdate = createdate;
149
+    }
150
+
151
+    public String getUpdatename() {
152
+        return updatename;
153
+    }
154
+
155
+    public void setUpdatename(String updatename) {
156
+        this.updatename = updatename;
157
+    }
158
+
159
+    public Date getUpdatedate() {
160
+        return updatedate;
161
+    }
162
+
163
+    public void setUpdatedate(Date updatedate) {
164
+        this.updatedate = updatedate;
165
+    }
166
+
167
+    public Integer getOrgId() {
168
+        return orgId;
169
+    }
170
+
171
+    public void setOrgId(Integer orgId) {
172
+        this.orgId = orgId;
173
+    }
174
+
175
+    public String getPurchaseCode() {
176
+        return purchaseCode;
177
+    }
178
+
179
+    public void setPurchaseCode(String purchaseCode) {
180
+        this.purchaseCode = purchaseCode;
181
+    }
182
+
183
+    public String getPurchasePlanName() {
184
+        return purchasePlanName;
185
+    }
186
+
187
+    public void setPurchasePlanName(String purchasePlanName) {
188
+        this.purchasePlanName = purchasePlanName;
189
+    }
190
+
191
+    public String getPurchaseDepartment() {
192
+        return purchaseDepartment;
193
+    }
194
+
195
+    public void setPurchaseDepartment(String purchaseDepartment) {
196
+        this.purchaseDepartment = purchaseDepartment;
197
+    }
198
+
199
+    public String getPurchasePersonnel() {
200
+        return purchasePersonnel;
201
+    }
202
+
203
+    public void setPurchasePersonnel(String purchasePersonnel) {
204
+        this.purchasePersonnel = purchasePersonnel;
205
+    }
206
+
207
+    public String getContactInformation() {
208
+        return contactInformation;
209
+    }
210
+
211
+    public void setContactInformation(String contactInformation) {
212
+        this.contactInformation = contactInformation;
213
+    }
214
+
215
+    public Date getPurchaseRequestTime() {
216
+        return purchaseRequestTime;
217
+    }
218
+
219
+    public void setPurchaseRequestTime(Date purchaseRequestTime) {
220
+        this.purchaseRequestTime = purchaseRequestTime;
221
+    }
222
+
223
+    public Integer getPurchaseStatus() {
224
+        return purchaseStatus;
225
+    }
226
+
227
+    public void setPurchaseStatus(Integer purchaseStatus) {
228
+        this.purchaseStatus = purchaseStatus;
229
+    }
230
+
231
+    public String getPurchaseCommodity() {
232
+        return purchaseCommodity;
233
+    }
234
+
235
+    public void setPurchaseCommodity(String purchaseCommodity) {
236
+        this.purchaseCommodity = purchaseCommodity;
237
+    }
238
+
239
+    public BigDecimal getPurchaseAmount() {
240
+        return purchaseAmount;
241
+    }
242
+
243
+    public void setPurchaseAmount(BigDecimal purchaseAmount) {
244
+        this.purchaseAmount = purchaseAmount;
245
+    }
246
+
247
+    public Integer getPurchaseQuantity() {
248
+        return purchaseQuantity;
249
+    }
250
+
251
+    public void setPurchaseQuantity(Integer purchaseQuantity) {
252
+        this.purchaseQuantity = purchaseQuantity;
253
+    }
254
+
255
+    public BigDecimal getPurchaseUnitPrice() {
256
+        return purchaseUnitPrice;
257
+    }
258
+
259
+    public void setPurchaseUnitPrice(BigDecimal purchaseUnitPrice) {
260
+        this.purchaseUnitPrice = purchaseUnitPrice;
261
+    }
262
+}

+ 225 - 0
src/main/java/com/chinaitop/depot/device/model/param/BusinessImPurchaseSaleEditParam.java

@@ -0,0 +1,225 @@
1
+/*
2
+ * Copyright [2022] [https://www.xiaonuo.vip]
3
+ *
4
+ * Snowy采用APACHE LICENSE 2.0开源协议,您在使用过程中,需要注意以下几点:
5
+ *
6
+ * 1.请不要删除和修改根目录下的LICENSE文件。
7
+ * 2.请不要删除和修改Snowy源码头部的版权声明。
8
+ * 3.本项目代码可免费商业使用,商业使用请保留源码和相关描述文件的项目出处,作者声明等。
9
+ * 4.分发源码时候,请注明软件出处 https://www.xiaonuo.vip
10
+ * 5.不可二次分发开源参与同类竞品,如有想法可联系团队xiaonuobase@qq.com商议合作。
11
+ * 6.若您的项目无法满足以上几点,需要更多功能代码,获取Snowy商业授权许可,请在官网购买授权,地址为 https://www.xiaonuo.vip
12
+ */
13
+package com.chinaitop.depot.device.model.param;
14
+
15
+import io.swagger.annotations.ApiModelProperty;
16
+import javax.validation.constraints.NotNull;
17
+import java.math.BigDecimal;
18
+import java.util.Date;
19
+
20
+/**
21
+ * 综合业务管理-采购销售管理表编辑参数
22
+ *
23
+ * @author hjc
24
+ * @date  2024/06/05 21:11
25
+ **/
26
+public class BusinessImPurchaseSaleEditParam {
27
+
28
+    /** 主键ID */
29
+    @ApiModelProperty(value = "主键ID", required = true, position = 1)
30
+    @NotNull(message = "id不能为空")
31
+    private Integer id;
32
+
33
+    /** 创建人 */
34
+    @ApiModelProperty(value = "创建人", position = 2)
35
+    private String createname;
36
+
37
+    /** 创建日期 */
38
+    @ApiModelProperty(value = "创建日期", position = 3)
39
+    private Date createdate;
40
+
41
+    /** 更新人 */
42
+    @ApiModelProperty(value = "更新人", position = 4)
43
+    private String updatename;
44
+
45
+    /** 更新日期 */
46
+    @ApiModelProperty(value = "更新日期", position = 5)
47
+    private Date updatedate;
48
+
49
+    /** 单位id */
50
+    @ApiModelProperty(value = "单位id", position = 6)
51
+    private Integer orgId;
52
+
53
+/*    *//** 采购编号 *//*
54
+    @ApiModelProperty(value = "采购编号", position = 7)
55
+    private String purchaseCode;*/
56
+
57
+    /** 采购计划名称 */
58
+    @ApiModelProperty(value = "采购计划名称", position = 8)
59
+    private String purchasePlanName;
60
+
61
+    /** 采购部门 */
62
+    @ApiModelProperty(value = "采购部门", position = 9)
63
+    private String purchaseDepartment;
64
+
65
+    /** 采购人员 */
66
+    @ApiModelProperty(value = "采购人员", position = 10)
67
+    private String purchasePersonnel;
68
+
69
+    /** 联系方式 */
70
+    @ApiModelProperty(value = "联系方式", position = 11)
71
+    private String contactInformation;
72
+
73
+    /** 采购申请时间 */
74
+    @ApiModelProperty(value = "采购申请时间", position = 12)
75
+    private Date purchaseRequestTime;
76
+
77
+    /** 采购状态,1:未采购;2:采购中;3:采购完成; */
78
+    @ApiModelProperty(value = "采购状态,1:未采购;2:采购中;3:采购完成;", position = 13)
79
+    private Integer purchaseStatus;
80
+
81
+    /** 采购商品 */
82
+    @ApiModelProperty(value = "采购商品", position = 14)
83
+    private String purchaseCommodity;
84
+
85
+    /** 采购金额(元) */
86
+    @ApiModelProperty(value = "采购金额(元)", position = 15)
87
+    private BigDecimal purchaseAmount;
88
+
89
+    /** 采购数量 */
90
+    @ApiModelProperty(value = "采购数量", position = 16)
91
+    private Integer purchaseQuantity;
92
+
93
+    /** 采购单价 */
94
+    @ApiModelProperty(value = "采购单价", position = 17)
95
+    private BigDecimal purchaseUnitPrice;
96
+
97
+
98
+    public Integer getId() {
99
+        return id;
100
+    }
101
+
102
+    public void setId(Integer id) {
103
+        this.id = id;
104
+    }
105
+
106
+    public String getCreatename() {
107
+        return createname;
108
+    }
109
+
110
+    public void setCreatename(String createname) {
111
+        this.createname = createname;
112
+    }
113
+
114
+    public Date getCreatedate() {
115
+        return createdate;
116
+    }
117
+
118
+    public void setCreatedate(Date createdate) {
119
+        this.createdate = createdate;
120
+    }
121
+
122
+    public String getUpdatename() {
123
+        return updatename;
124
+    }
125
+
126
+    public void setUpdatename(String updatename) {
127
+        this.updatename = updatename;
128
+    }
129
+
130
+    public Date getUpdatedate() {
131
+        return updatedate;
132
+    }
133
+
134
+    public void setUpdatedate(Date updatedate) {
135
+        this.updatedate = updatedate;
136
+    }
137
+
138
+    public Integer getOrgId() {
139
+        return orgId;
140
+    }
141
+
142
+    public void setOrgId(Integer orgId) {
143
+        this.orgId = orgId;
144
+    }
145
+
146
+    public String getPurchasePlanName() {
147
+        return purchasePlanName;
148
+    }
149
+
150
+    public void setPurchasePlanName(String purchasePlanName) {
151
+        this.purchasePlanName = purchasePlanName;
152
+    }
153
+
154
+    public String getPurchaseDepartment() {
155
+        return purchaseDepartment;
156
+    }
157
+
158
+    public void setPurchaseDepartment(String purchaseDepartment) {
159
+        this.purchaseDepartment = purchaseDepartment;
160
+    }
161
+
162
+    public String getPurchasePersonnel() {
163
+        return purchasePersonnel;
164
+    }
165
+
166
+    public void setPurchasePersonnel(String purchasePersonnel) {
167
+        this.purchasePersonnel = purchasePersonnel;
168
+    }
169
+
170
+    public String getContactInformation() {
171
+        return contactInformation;
172
+    }
173
+
174
+    public void setContactInformation(String contactInformation) {
175
+        this.contactInformation = contactInformation;
176
+    }
177
+
178
+    public Date getPurchaseRequestTime() {
179
+        return purchaseRequestTime;
180
+    }
181
+
182
+    public void setPurchaseRequestTime(Date purchaseRequestTime) {
183
+        this.purchaseRequestTime = purchaseRequestTime;
184
+    }
185
+
186
+    public Integer getPurchaseStatus() {
187
+        return purchaseStatus;
188
+    }
189
+
190
+    public void setPurchaseStatus(Integer purchaseStatus) {
191
+        this.purchaseStatus = purchaseStatus;
192
+    }
193
+
194
+    public String getPurchaseCommodity() {
195
+        return purchaseCommodity;
196
+    }
197
+
198
+    public void setPurchaseCommodity(String purchaseCommodity) {
199
+        this.purchaseCommodity = purchaseCommodity;
200
+    }
201
+
202
+    public BigDecimal getPurchaseAmount() {
203
+        return purchaseAmount;
204
+    }
205
+
206
+    public void setPurchaseAmount(BigDecimal purchaseAmount) {
207
+        this.purchaseAmount = purchaseAmount;
208
+    }
209
+
210
+    public Integer getPurchaseQuantity() {
211
+        return purchaseQuantity;
212
+    }
213
+
214
+    public void setPurchaseQuantity(Integer purchaseQuantity) {
215
+        this.purchaseQuantity = purchaseQuantity;
216
+    }
217
+
218
+    public BigDecimal getPurchaseUnitPrice() {
219
+        return purchaseUnitPrice;
220
+    }
221
+
222
+    public void setPurchaseUnitPrice(BigDecimal purchaseUnitPrice) {
223
+        this.purchaseUnitPrice = purchaseUnitPrice;
224
+    }
225
+}

+ 86 - 0
src/main/java/com/chinaitop/depot/device/model/param/BusinessImPurchaseSalePageParam.java

@@ -0,0 +1,86 @@
1
+package com.chinaitop.depot.device.model.param;
2
+
3
+import io.swagger.annotations.ApiModelProperty;
4
+
5
+import javax.validation.constraints.NotBlank;
6
+import javax.validation.constraints.NotNull;
7
+
8
+/**
9
+ * @author hjc
10
+ * @version 1.0
11
+ * @Description
12
+ * @date 2024/6/6 14:20
13
+ */
14
+
15
+public class BusinessImPurchaseSalePageParam {
16
+
17
+    /**
18
+     * 当前页
19
+     */
20
+    @ApiModelProperty(value = "页码")
21
+    private Integer pageNum;
22
+
23
+    /**
24
+     * 每页条数
25
+     */
26
+    @ApiModelProperty(value = "每页条数")
27
+    private Integer pageSize;
28
+
29
+    /**
30
+     * 采购编号
31
+     */
32
+    @ApiModelProperty(value = "采购编号", position = 7)
33
+    private String purchaseCode;
34
+
35
+    /**
36
+     * 采购计划名称
37
+     */
38
+    @ApiModelProperty(value = "采购计划名称", position = 8)
39
+    private String purchasePlanName;
40
+
41
+    /**
42
+     * 采购编号
43
+     */
44
+    @ApiModelProperty(value = "组织id", position = 9)
45
+    private Integer orgId;
46
+
47
+    public Integer getOrgId() {
48
+        return orgId;
49
+    }
50
+
51
+    public void setOrgId(Integer orgId) {
52
+        this.orgId = orgId;
53
+    }
54
+
55
+    public Integer getPageNum() {
56
+        return pageNum;
57
+    }
58
+
59
+    public void setPageNum(Integer pageNum) {
60
+        this.pageNum = pageNum;
61
+    }
62
+
63
+    public Integer getPageSize() {
64
+        return pageSize;
65
+    }
66
+
67
+    public void setPageSize(Integer pageSize) {
68
+        this.pageSize = pageSize;
69
+    }
70
+
71
+    public String getPurchaseCode() {
72
+        return purchaseCode;
73
+    }
74
+
75
+    public void setPurchaseCode(String purchaseCode) {
76
+        this.purchaseCode = purchaseCode;
77
+    }
78
+
79
+    public String getPurchasePlanName() {
80
+        return purchasePlanName;
81
+    }
82
+
83
+    public void setPurchasePlanName(String purchasePlanName) {
84
+        this.purchasePlanName = purchasePlanName;
85
+    }
86
+}

+ 21 - 0
src/main/java/com/chinaitop/depot/device/service/BusinessImAssetService.java

@@ -0,0 +1,21 @@
1
+package com.chinaitop.depot.device.service;
2
+
3
+import java.util.List;
4
+
5
+import com.chinaitop.depot.device.model.BusinessImAsset;
6
+import com.chinaitop.depot.device.model.BusinessImAssetExample;
7
+
8
+
9
+public interface BusinessImAssetService {
10
+
11
+	List<BusinessImAsset> getList(BusinessImAssetExample businessImAssetExample);
12
+
13
+	void remove(Integer id);
14
+
15
+	void save(BusinessImAsset businessImAsset);
16
+
17
+	BusinessImAsset loadDataById(int id);
18
+
19
+	String getAssetCode(Integer orgId);
20
+
21
+}

+ 64 - 0
src/main/java/com/chinaitop/depot/device/service/BusinessImPurchaseSaleService.java

@@ -0,0 +1,64 @@
1
+package com.chinaitop.depot.device.service;
2
+
3
+
4
+import com.baomidou.mybatisplus.extension.service.IService;
5
+import com.chinaitop.depot.device.model.BusinessImPurchaseSale;
6
+import com.chinaitop.depot.device.model.param.BusinessImPurchaseSaleAddParam;
7
+import com.chinaitop.depot.device.model.param.BusinessImPurchaseSaleEditParam;
8
+import com.chinaitop.depot.device.model.param.BusinessImPurchaseSalePageParam;
9
+import com.github.pagehelper.Page;
10
+import com.github.pagehelper.PageInfo;
11
+
12
+/**
13
+ * <p>
14
+ * 智能管理-综合业务管理-采购销售管理表 服务类
15
+ * </p>
16
+ *
17
+ * @author root
18
+ * @since 2024-06-06
19
+ */
20
+public interface BusinessImPurchaseSaleService extends IService<BusinessImPurchaseSale> {
21
+
22
+    /**
23
+     * @author: hujianchun
24
+     * @Description:
25
+     * @param:
26
+     * @return: 查询 采购销售管理 信息列表
27
+     */
28
+    PageInfo<BusinessImPurchaseSale> getList(BusinessImPurchaseSalePageParam pageParam);
29
+
30
+    /**
31
+     * @author: hujianchun
32
+     * @Description:
33
+     * @param:
34
+     * @return: 采购销售管理-新增
35
+     */
36
+    int saveData(BusinessImPurchaseSaleAddParam param);
37
+
38
+    /**
39
+     * @author: hujianchun
40
+     * @Description:
41
+     * @param:
42
+     * @return: 采购销售管理-详情
43
+     */
44
+    BusinessImPurchaseSale getById(String id);
45
+
46
+    /**
47
+     * @author: hujianchun
48
+     * @Description:
49
+     * @param:
50
+     * @return: 采购销售管理-修改
51
+     */
52
+    int updateData(BusinessImPurchaseSaleEditParam param);
53
+
54
+    /**
55
+     * @author: hujianchun
56
+     * @Description:
57
+     * @param:
58
+     * @return: 采购销售管理-删除
59
+     */
60
+    int deleteData(String id);
61
+
62
+
63
+    void saveOrUpdateBusinessImPurchaseSale(BusinessImPurchaseSale businessImPurchaseSale);
64
+}

+ 126 - 0
src/main/java/com/chinaitop/depot/device/service/impl/BusinessImAssetServiceImpl.java

@@ -0,0 +1,126 @@
1
+package com.chinaitop.depot.device.service.impl;
2
+import java.util.Calendar;
3
+import java.util.Date;
4
+import java.util.List;
5
+
6
+import javax.annotation.Resource;
7
+
8
+import org.springframework.stereotype.Service;
9
+
10
+import com.chinaitop.depot.device.mapper.BusinessImAssetMapper;
11
+import com.chinaitop.depot.device.model.BusinessImAsset;
12
+import com.chinaitop.depot.device.model.BusinessImAssetExample;
13
+import com.chinaitop.depot.device.service.BusinessImAssetService;
14
+import com.chinaitop.depot.utils.ParameterUtil;
15
+
16
+
17
+@Service
18
+public class BusinessImAssetServiceImpl implements BusinessImAssetService{
19
+
20
+	@Resource
21
+	private BusinessImAssetMapper businessImAssetMapper;
22
+	
23
+	/**
24
+	 * 分页信息
25
+	 */
26
+	@Override
27
+	public List<BusinessImAsset> getList(BusinessImAssetExample businessImAssetExample) {
28
+		// TODO Auto-generated method stub
29
+	        return businessImAssetMapper.selectByExample(businessImAssetExample);
30
+	}
31
+
32
+	/**
33
+	 * 
34
+	 */
35
+	@Override
36
+	public void remove(Integer id) {
37
+		// TODO Auto-generated method stub
38
+		businessImAssetMapper.deleteByPrimaryKey(id);
39
+	}
40
+	
41
+	
42
+	/**
43
+	 * 提交修改和新增
44
+	 */
45
+	@Override
46
+	public void save(BusinessImAsset businessImAsset) {
47
+		// TODO Auto-generated method stub
48
+		if (businessImAsset.getId() == null) {
49
+			businessImAsset.setCreatedate(new Date());
50
+			businessImAssetMapper.insertSelective(businessImAsset);// 新增数据
51
+		} else {
52
+			businessImAsset.setUpdatedate(new Date());
53
+			businessImAssetMapper.updateByPrimaryKeySelective(businessImAsset);// 修改数据
54
+		}
55
+	}
56
+	
57
+	
58
+	/**
59
+	 * 查询
60
+	 */
61
+	@Override
62
+	public BusinessImAsset loadDataById(int id) {
63
+		// TODO Auto-generated method stub
64
+		return businessImAssetMapper.selectByPrimaryKey(id);
65
+	}
66
+
67
+	//编号规则:ZC+年份+日期+00n 
68
+	@Override
69
+	public String getAssetCode(Integer orgId) {
70
+		// TODO Auto-generated method stub
71
+		Calendar calendar = Calendar.getInstance();
72
+		String year = calendar.get(Calendar.YEAR)+"";
73
+		String month = calendar.get(Calendar.MONTH)+1+"";
74
+		String dayOfMonth = calendar.get(Calendar.DAY_OF_MONTH)+"";
75
+		 if(month.length()==1){
76
+			 month = "0"+month;
77
+		 }
78
+		 if(dayOfMonth.length()==1){
79
+			 dayOfMonth = "0" +dayOfMonth;
80
+		 }
81
+		String str = "ZC"+year+""+month+""+dayOfMonth;
82
+		
83
+		BusinessImAssetExample businessImAssetExample=new BusinessImAssetExample();
84
+		BusinessImAssetExample.Criteria criteria=businessImAssetExample.createCriteria();
85
+    	
86
+    	if(ParameterUtil.isnotnull(orgId)){
87
+    		criteria.andOrgIdEqualTo(orgId);
88
+    	}
89
+
90
+        //排序
91
+    	businessImAssetExample.setOrderByClause("id desc");
92
+    	List<BusinessImAsset> list = businessImAssetMapper.selectByExample(businessImAssetExample);
93
+    	if(list.size()>0){
94
+    		String assetCode= list.get(0).getAssetCode();
95
+    		String lastThreeChars  = assetCode.substring(assetCode.length()-3);
96
+    		
97
+    		String a = Integer.valueOf(lastThreeChars)+1+"";
98
+    		if(a.length()==1){
99
+    			a = "00"+a;
100
+    		}else if(a.length()==2){
101
+    			a = "0"+a;
102
+    		}
103
+    		
104
+    		String yearChars  = assetCode.substring(2,6);
105
+    		String monthChars  = assetCode.substring(6,10);
106
+
107
+    		if(!year.equals(yearChars)){
108
+    			if(!month.equals(monthChars)){
109
+        			str = str + "001";
110
+    			}
111
+    		}else{
112
+    			if((month+""+dayOfMonth).equals(monthChars)){
113
+        			str = str + a;
114
+    			}
115
+    		}
116
+    		
117
+    	}else{
118
+    		str = str + "001";     
119
+    	}
120
+		return str;
121
+	}
122
+	
123
+	
124
+
125
+
126
+}

+ 149 - 0
src/main/java/com/chinaitop/depot/device/service/impl/BusinessImPurchaseSaleServiceImpl.java

@@ -0,0 +1,149 @@
1
+package com.chinaitop.depot.device.service.impl;
2
+
3
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
4
+import com.chinaitop.depot.device.mapper.BusinessImPurchaseSaleMapper;
5
+import com.chinaitop.depot.device.model.BusinessImPurchaseSale;
6
+import com.chinaitop.depot.device.model.param.BusinessImPurchaseSaleAddParam;
7
+import com.chinaitop.depot.device.model.param.BusinessImPurchaseSaleEditParam;
8
+import com.chinaitop.depot.device.model.param.BusinessImPurchaseSalePageParam;
9
+import com.chinaitop.depot.device.service.BusinessImPurchaseSaleService;
10
+import com.github.pagehelper.Page;
11
+import com.github.pagehelper.PageHelper;
12
+import com.github.pagehelper.PageInfo;
13
+import org.springframework.beans.BeanUtils;
14
+import org.springframework.beans.factory.annotation.Autowired;
15
+import org.springframework.stereotype.Service;
16
+
17
+import java.time.LocalDate;
18
+import java.time.format.DateTimeFormatter;
19
+import java.util.Date;
20
+import java.util.HashMap;
21
+import java.util.List;
22
+import java.util.Map;
23
+
24
+/**
25
+ * <p>
26
+ * 智能管理-综合业务管理-采购销售管理表 服务实现类
27
+ * </p>
28
+ *
29
+ * @author root
30
+ * @since 2024-06-06
31
+ */
32
+@Service
33
+public class BusinessImPurchaseSaleServiceImpl extends ServiceImpl<BusinessImPurchaseSaleMapper, BusinessImPurchaseSale> implements BusinessImPurchaseSaleService {
34
+    private static Map<String, Integer> sequenceNumbers = new HashMap<>(); // 映射:仓房代码到顺序号
35
+    private static final int MAX_SEQUENCE_NUMBER = 10000; // 顺序号的最大值
36
+    private static final String DATE_FORMAT = "yyyyMMdd";
37
+    private static final DateTimeFormatter DATE_FORMATTER = DateTimeFormatter.ofPattern(DATE_FORMAT);
38
+
39
+
40
+    @Autowired
41
+    private BusinessImPurchaseSaleMapper businessImPurchaseSaleMapper;
42
+
43
+
44
+    @Override
45
+    public PageInfo<BusinessImPurchaseSale> getList(BusinessImPurchaseSalePageParam pageParam) {
46
+
47
+        PageHelper.startPage(pageParam.getPageNum(), pageParam.getPageSize());
48
+
49
+        List<BusinessImPurchaseSale> list= businessImPurchaseSaleMapper.getList(pageParam.getPurchaseCode(), pageParam.getPurchasePlanName(),pageParam.getOrgId());
50
+
51
+        PageInfo<BusinessImPurchaseSale> page = new PageInfo<>(list);
52
+        return page;
53
+
54
+    }
55
+
56
+
57
+    @Override
58
+    public int saveData(BusinessImPurchaseSaleAddParam param) {
59
+
60
+        BusinessImPurchaseSale businessImPurchaseSale = new BusinessImPurchaseSale();
61
+        BeanUtils.copyProperties(param, businessImPurchaseSale);
62
+
63
+        //生成资产编号
64
+        sequenceNumbers.putIfAbsent("CG", 0);
65
+        // 增加当前货位的顺序号,并在达到最大值时重置为0
66
+        int sequenceNumber = (sequenceNumbers.get("CG") + 1) % MAX_SEQUENCE_NUMBER;
67
+        sequenceNumbers.put("CG", sequenceNumber);
68
+        // 确保顺序号是4位数
69
+        String formattedSequenceNumber = String.format("%03d", sequenceNumber);
70
+        // 获取当前日期并格式化为yyyyMMdd
71
+        String currentDate = LocalDate.now().format(DATE_FORMATTER);
72
+        // 合并、日期和顺序号
73
+        String assetCode = "CG" +currentDate + formattedSequenceNumber;
74
+        businessImPurchaseSale.setPurchaseCode(assetCode);
75
+        businessImPurchaseSale.setCreatedate(new Date());
76
+        businessImPurchaseSale.setUpdatedate(new Date());
77
+
78
+        try {
79
+            // businessImPurchaseSaleMapper.insertBusinessImPurchaseSale(businessImPurchaseSale);
80
+            return businessImPurchaseSaleMapper.insert(businessImPurchaseSale);
81
+        } catch (Exception e) {
82
+            throw new RuntimeException("新增数据失败" + e.getMessage());
83
+        }
84
+
85
+    }
86
+
87
+    @Override
88
+    public int updateData(BusinessImPurchaseSaleEditParam param) {
89
+        BusinessImPurchaseSale businessImPurchaseSale = new BusinessImPurchaseSale();
90
+        BeanUtils.copyProperties(param, businessImPurchaseSale);
91
+        businessImPurchaseSale.setUpdatedate(new Date());
92
+        try {
93
+            return businessImPurchaseSaleMapper.updateById(businessImPurchaseSale);
94
+        } catch (Exception e) {
95
+            throw new RuntimeException("修改数据失败" + e.getMessage());
96
+        }
97
+
98
+    }
99
+
100
+
101
+    @Override
102
+    public void saveOrUpdateBusinessImPurchaseSale(BusinessImPurchaseSale businessImPurchaseSale) {
103
+
104
+        if (businessImPurchaseSale.getId()==null){
105
+
106
+            //生成资产编号
107
+            sequenceNumbers.putIfAbsent("CG", 0);
108
+            // 增加当前货位的顺序号,并在达到最大值时重置为0
109
+            int sequenceNumber = (sequenceNumbers.get("CG") + 1) % MAX_SEQUENCE_NUMBER;
110
+            sequenceNumbers.put("CG", sequenceNumber);
111
+            // 确保顺序号是4位数
112
+            String formattedSequenceNumber = String.format("%03d", sequenceNumber);
113
+            // 获取当前日期并格式化为yyyyMMdd
114
+            String currentDate = LocalDate.now().format(DATE_FORMATTER);
115
+            // 合并、日期和顺序号
116
+            String assetCode = "CG" +currentDate + formattedSequenceNumber;
117
+            businessImPurchaseSale.setPurchaseCode(assetCode);
118
+            businessImPurchaseSale.setCreatedate(new Date());
119
+
120
+
121
+            try {
122
+                // businessImPurchaseSaleMapper.insertBusinessImPurchaseSale(businessImPurchaseSale);
123
+                 businessImPurchaseSaleMapper.insert(businessImPurchaseSale);
124
+            } catch (Exception e) {
125
+                throw new RuntimeException("新增数据失败" + e.getMessage());
126
+            }
127
+        }else {
128
+            businessImPurchaseSale.setUpdatedate(new Date());
129
+            businessImPurchaseSaleMapper.updateById(businessImPurchaseSale);
130
+        }
131
+    }
132
+
133
+    @Override
134
+    public int deleteData(String id) {
135
+
136
+        return businessImPurchaseSaleMapper.deleteById(id);
137
+    }
138
+
139
+    /**
140
+     * @author: hujianchun
141
+     * @Description:
142
+     * @param:
143
+     * @return: 采购销售管理-详情
144
+     */
145
+    @Override
146
+    public BusinessImPurchaseSale getById(String id) {
147
+        return businessImPurchaseSaleMapper.getById(id);
148
+    }
149
+}

+ 1 - 1
src/main/resources/bootstrap-dev.yml

@@ -14,7 +14,7 @@ eureka:
14 14
 spring:
15 15
   # 数据库配置
16 16
   datasource:
17
-    driver-class-name: com.mysql.cj.jdbc.Driver
17
+    driver-class-name: com.mysql.jdbc.Driver
18 18
     url: jdbc:mysql://172.16.0.36:3306/depot_qh?useUnicode=true&characterEncoding=utf-8&useSSL=false
19 19
     username: root
20 20
     password: admin@1234