|
@@ -16,9 +16,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
16
|
16
|
import org.springframework.web.bind.annotation.*;
|
17
|
17
|
|
18
|
18
|
import javax.servlet.http.HttpServletRequest;
|
19
|
|
-import java.math.BigDecimal;
|
20
|
19
|
import java.time.LocalDateTime;
|
21
|
|
-import java.util.ArrayList;
|
22
|
20
|
import java.util.List;
|
23
|
21
|
|
24
|
22
|
|
|
@@ -269,13 +267,13 @@ public class TaContactController extends BaseController {
|
269
|
267
|
* @param id 实体ID
|
270
|
268
|
*/
|
271
|
269
|
@RequestMapping(value = "/channel/taContactFinance/{id}", method = RequestMethod.PUT)
|
272
|
|
- public ResponseBean taContactInfoAdd(@PathVariable Integer id) {
|
|
270
|
+ public ResponseBean taContactInfoAdd(@PathVariable Integer id,@RequestParam String contactType) {
|
273
|
271
|
ResponseBean responseBean = new ResponseBean();
|
274
|
272
|
TaContact contact = iTaContactService.getById(id);
|
275
|
273
|
try {
|
276
|
274
|
TaContact taContact = new TaContact();
|
277
|
275
|
taContact.setContactId(id);
|
278
|
|
- taContact.setContactType(CommConstant.FINANCE);
|
|
276
|
+ taContact.setContactType(contactType);
|
279
|
277
|
if (!StringUtils.isEmpty(contact.getOrderNo())){
|
280
|
278
|
taContact.setOrderNo(contact.getOrderNo());
|
281
|
279
|
}
|
|
@@ -296,11 +294,16 @@ public class TaContactController extends BaseController {
|
296
|
294
|
* 删除财务联系人
|
297
|
295
|
*/
|
298
|
296
|
@RequestMapping(value = "/channel/taContactFinanceDel", method = RequestMethod.PUT)
|
299
|
|
- public ResponseBean taContactInfoAdd(@RequestBody List<TaContact> taContacts) {
|
|
297
|
+ public ResponseBean taContactInfoAdd(@RequestBody List<TaContact> taContacts,@RequestParam String contactType) {
|
300
|
298
|
ResponseBean responseBean = new ResponseBean();
|
301
|
299
|
try {
|
|
300
|
+ String replaceType = CommConstant.CONCAT_TYPE_PROMOTE;
|
|
301
|
+ if (contactType.equals(CommConstant.FINANCE)){
|
|
302
|
+ replaceType = CommConstant.CONCAT_TYPE_FINANCE;
|
|
303
|
+ }
|
|
304
|
+ String finalReplaceType = replaceType;
|
302
|
305
|
taContacts.forEach(e -> {
|
303
|
|
- e.setContactType(e.getContactType().replaceAll( CommConstant.CONCAT_TYPE_FINANCE,""));
|
|
306
|
+ e.setContactType(e.getContactType().replaceAll(finalReplaceType,""));
|
304
|
307
|
});
|
305
|
308
|
if (iTaContactService.updateBatchById(taContacts)) {
|
306
|
309
|
responseBean.addSuccess(taContacts);
|