소스 검색

fix org delete

张延森 2 년 전
부모
커밋
dd69aad173

+ 1
- 1
deploy/.s/1636896505560465-cn-shanghai-stategrid-service-invoice-filling-httpTrigger.json 파일 보기

@@ -21,7 +21,7 @@
21 21
       "authType": "anonymous"
22 22
     },
23 23
     "createdTime": "2022-07-18T02:02:16Z",
24
-    "lastModifiedTime": "2022-07-18T07:56:57Z",
24
+    "lastModifiedTime": "2022-07-19T07:13:25Z",
25 25
     "name": "httpTrigger"
26 26
   }
27 27
 }

+ 3
- 3
deploy/.s/1636896505560465-cn-shanghai-stategrid-service-invoice-filling.json 파일 보기

@@ -8,13 +8,13 @@
8 8
     "timeout": 30,
9 9
     "initializer": "",
10 10
     "initializationTimeout": 3,
11
-    "codeSize": 69219873,
12
-    "codeChecksum": "8933832746482495729",
11
+    "codeSize": 69220537,
12
+    "codeChecksum": "5731091282673601247",
13 13
     "memorySize": 1024,
14 14
     "gpuMemorySize": null,
15 15
     "environmentVariables": {},
16 16
     "createdTime": "2022-07-18T02:02:16Z",
17
-    "lastModifiedTime": "2022-07-18T07:56:50Z",
17
+    "lastModifiedTime": "2022-07-19T07:13:16Z",
18 18
     "instanceConcurrency": 1,
19 19
     "instanceSoftConcurrency": null,
20 20
     "customContainerConfig": null,

+ 1
- 1
deploy/.s/1636896505560465-cn-shanghai-stategrid-service.json 파일 보기

@@ -12,7 +12,7 @@
12 12
     },
13 13
     "serviceId": "6e96fa7b-9988-4908-b06a-0aa7e510c881",
14 14
     "createdTime": "2022-02-26T04:50:56Z",
15
-    "lastModifiedTime": "2022-07-18T07:56:57Z",
15
+    "lastModifiedTime": "2022-07-19T07:13:25Z",
16 16
     "vpcConfig": {
17 17
       "vpcId": "",
18 18
       "vSwitchIds": [],

+ 1
- 1
deploy/.s/invoice-filling.stategrid.njyunzhi.com.json 파일 보기

@@ -33,5 +33,5 @@
33 33
     ]
34 34
   },
35 35
   "createdTime": "2022-07-18T02:03:47Z",
36
-  "lastModifiedTime": "2022-07-18T07:56:57Z"
36
+  "lastModifiedTime": "2022-07-19T07:13:25Z"
37 37
 }

+ 1
- 1
deploy/s.prod.yaml 파일 보기

@@ -49,7 +49,7 @@ services:
49 49
       function:
50 50
         name: invoice-filling
51 51
         description: '发票确认'
52
-        codeUri: ../target/invoice-0.0.1.jar
52
+        codeUri: ../target/invoice-0.0.3.jar
53 53
         runtime: custom
54 54
         memorySize: 1024
55 55
         timeout: 30

+ 1
- 1
pom.xml 파일 보기

@@ -10,7 +10,7 @@
10 10
 	</parent>
11 11
 	<groupId>com.njyunzhi</groupId>
12 12
 	<artifactId>invoice</artifactId>
13
-	<version>0.0.1</version>
13
+	<version>0.0.3</version>
14 14
 	<name>invoice-fill</name>
15 15
 	<description>发票填报</description>
16 16
 	<properties>

+ 12
- 1
src/main/java/com/njyunzhi/invoice/controller/TaInvoicePersonController.java 파일 보기

@@ -114,7 +114,18 @@ public class TaInvoicePersonController extends BaseController {
114 114
      */
115 115
     @RequestMapping(value="/admin/invoice/{invoiceId}/person/{id}", method= RequestMethod.DELETE)
116 116
     @ApiOperation(value="删除", notes = "删除", httpMethod = "DELETE", response = ResponseBean.class)
117
-    public ResponseBean taInvoicePersonDelete(@ApiParam("对象ID") @PathVariable String id) throws Exception{
117
+    public ResponseBean taInvoicePersonDelete(@ApiParam("对象ID") @PathVariable String id) throws Exception {
118
+        TaInvoicePerson taInvoicePerson = iTaInvoicePersonService.getById(id);
119
+        if (null == taInvoicePerson) {
120
+            return ResponseBean.success("success");
121
+        }
122
+
123
+        // 判断是否需要删除单位信息
124
+        int cnt = iTaInvoicePersonService.countBy("invoice_org_id", taInvoicePerson.getInvoiceOrgId(), true);
125
+        if (cnt <= 1) {
126
+            iTaInvoiceOrgService.removeLogicById(taInvoicePerson.getInvoiceOrgId());
127
+        }
128
+
118 129
         if (iTaInvoicePersonService.removeLogicById(id)) {
119 130
             return ResponseBean.success("success");
120 131
         } else {

+ 9
- 0
src/main/java/com/njyunzhi/invoice/entity/TaInvoiceDetail.java 파일 보기

@@ -108,6 +108,15 @@ public class TaInvoiceDetail implements Serializable {
108 108
     @ApiModelProperty(value = "住宿清单")
109 109
     private String stayRemark;
110 110
 
111
+    @ApiModelProperty(value = "收件人姓名")
112
+    private String mailUser;
113
+
114
+    @ApiModelProperty(value = "收件人电话")
115
+    private String mailPhone;
116
+
117
+    @ApiModelProperty(value = "收件人地址")
118
+    private String mailAddress;
119
+
111 120
     @ApiModelProperty(value = "状态")
112 121
     private Integer status;
113 122
 

+ 3
- 0
src/main/java/com/njyunzhi/invoice/service/impl/TaInvoiceDetailServiceImpl.java 파일 보기

@@ -104,6 +104,9 @@ public class TaInvoiceDetailServiceImpl extends ServiceImpl<TaInvoiceDetailMappe
104 104
             origin.setPersonId(taInvoiceDetail.getPersonId());
105 105
             origin.setMergeRemark(taInvoiceDetail.getMergeRemark());
106 106
             origin.setStayRemark(taInvoiceDetail.getStayRemark());
107
+            origin.setMailAddress(taInvoiceDetail.getMailAddress());
108
+            origin.setMailPhone(taInvoiceDetail.getMailPhone());
109
+            origin.setMailUser(taInvoiceDetail.getMailUser());
107 110
 
108 111
             return updateById(origin);
109 112
         }

+ 1
- 1
src/main/resources/application-dev.yml 파일 보기

@@ -24,7 +24,7 @@ wx:
24 24
 
25 25
 ### 跨域
26 26
 cors:
27
-  enabled: true
27
+  enabled: false
28 28
   origins:
29 29
     - "http://localhost:8000"
30 30
   exposedHeaders:

BIN
src/main/resources/excel/invoice_tpl.xlsx 파일 보기


+ 3
- 0
src/main/resources/mapper/TaInvoiceDetailMapper.xml 파일 보기

@@ -100,6 +100,9 @@
100 100
             s.`charge`,
101 101
             t.`merge_remark`,
102 102
             t.`stay_remark`,
103
+            t.`mail_user`,
104
+            t.`mail_phone`,
105
+            t.`mail_address`,
103 106
             t.`status`,
104 107
             t.`create_date`
105 108
         FROM