Kaynağa Gözat

fix org delete

张延森 2 yıl önce
ebeveyn
işleme
dd69aad173

+ 1
- 1
deploy/.s/1636896505560465-cn-shanghai-stategrid-service-invoice-filling-httpTrigger.json Dosyayı Görüntüle

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

+ 3
- 3
deploy/.s/1636896505560465-cn-shanghai-stategrid-service-invoice-filling.json Dosyayı Görüntüle

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

+ 1
- 1
deploy/.s/1636896505560465-cn-shanghai-stategrid-service.json Dosyayı Görüntüle

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

+ 1
- 1
deploy/.s/invoice-filling.stategrid.njyunzhi.com.json Dosyayı Görüntüle

33
     ]
33
     ]
34
   },
34
   },
35
   "createdTime": "2022-07-18T02:03:47Z",
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 Dosyayı Görüntüle

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

+ 1
- 1
pom.xml Dosyayı Görüntüle

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

+ 12
- 1
src/main/java/com/njyunzhi/invoice/controller/TaInvoicePersonController.java Dosyayı Görüntüle

114
      */
114
      */
115
     @RequestMapping(value="/admin/invoice/{invoiceId}/person/{id}", method= RequestMethod.DELETE)
115
     @RequestMapping(value="/admin/invoice/{invoiceId}/person/{id}", method= RequestMethod.DELETE)
116
     @ApiOperation(value="删除", notes = "删除", httpMethod = "DELETE", response = ResponseBean.class)
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
         if (iTaInvoicePersonService.removeLogicById(id)) {
129
         if (iTaInvoicePersonService.removeLogicById(id)) {
119
             return ResponseBean.success("success");
130
             return ResponseBean.success("success");
120
         } else {
131
         } else {

+ 9
- 0
src/main/java/com/njyunzhi/invoice/entity/TaInvoiceDetail.java Dosyayı Görüntüle

108
     @ApiModelProperty(value = "住宿清单")
108
     @ApiModelProperty(value = "住宿清单")
109
     private String stayRemark;
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
     @ApiModelProperty(value = "状态")
120
     @ApiModelProperty(value = "状态")
112
     private Integer status;
121
     private Integer status;
113
 
122
 

+ 3
- 0
src/main/java/com/njyunzhi/invoice/service/impl/TaInvoiceDetailServiceImpl.java Dosyayı Görüntüle

104
             origin.setPersonId(taInvoiceDetail.getPersonId());
104
             origin.setPersonId(taInvoiceDetail.getPersonId());
105
             origin.setMergeRemark(taInvoiceDetail.getMergeRemark());
105
             origin.setMergeRemark(taInvoiceDetail.getMergeRemark());
106
             origin.setStayRemark(taInvoiceDetail.getStayRemark());
106
             origin.setStayRemark(taInvoiceDetail.getStayRemark());
107
+            origin.setMailAddress(taInvoiceDetail.getMailAddress());
108
+            origin.setMailPhone(taInvoiceDetail.getMailPhone());
109
+            origin.setMailUser(taInvoiceDetail.getMailUser());
107
 
110
 
108
             return updateById(origin);
111
             return updateById(origin);
109
         }
112
         }

+ 1
- 1
src/main/resources/application-dev.yml Dosyayı Görüntüle

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

BIN
src/main/resources/excel/invoice_tpl.xlsx Dosyayı Görüntüle


+ 3
- 0
src/main/resources/mapper/TaInvoiceDetailMapper.xml Dosyayı Görüntüle

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