胡北宽 1 viikko sitten
vanhempi
commit
b5c3f2037a

+ 1
- 1
src/main/java/com/example/backend/entity/common/SysUser.java Näytä tiedosto

@@ -278,7 +278,7 @@ public class SysUser {
278 278
     @TableField(exist = false)
279 279
     private String deptCode;
280 280
 
281
-
281
+    //
282 282
     @TableField(exist = false)
283 283
     private String cpny;
284 284
 

+ 5
- 5
src/main/java/com/example/backend/entity/pccontract/PCcontractDtl.java Näytä tiedosto

@@ -12,7 +12,7 @@ import java.util.List;
12 12
  * 合同交货明细从表
13 13
  */
14 14
 @Data
15
-@TableName("SGGMINFT.purchaseDtl")
15
+@TableName("SGGMIIP.purchaseDtl")
16 16
 public class PCcontractDtl extends BaseModelPur {
17 17
 
18 18
     private static final long serialVersionUID = 1L;
@@ -51,8 +51,8 @@ public class PCcontractDtl extends BaseModelPur {
51 51
     @TableField("dryTonQty")
52 52
     private BigDecimal dryTonQty;
53 53
 
54
-    @TableField("priceMode")
55
-    private String priceMode;
54
+    @TableField("priceMtd")
55
+    private String priceMtd;
56 56
 
57 57
     @TableField("qty")
58 58
     private BigDecimal qty;
@@ -119,8 +119,8 @@ public class PCcontractDtl extends BaseModelPur {
119 119
 
120 120
     @TableField("dept_id")
121 121
     private String deptId;
122
-    @TableField("fchno")
123
-    private int fchno;
122
+    //@TableField("fchno")
123
+    //private int fchno;
124 124
     @TableField(exist = false)
125 125
 
126 126
     private List<PCcontractDtl> purchaseDtls;

+ 1
- 1
src/main/java/com/example/backend/entity/pccontract/PCcontractPayment.java Näytä tiedosto

@@ -15,7 +15,7 @@ import java.util.Date;
15 15
  * 合同付款明细从表
16 16
  */
17 17
 @Data
18
-@TableName("SGGMINFT.purchasePayment")
18
+@TableName("SGGMIIP.purchasePayment")
19 19
 public class PCcontractPayment extends BaseModelPur {
20 20
 
21 21
     private static final long serialVersionUID = 1L;

+ 4
- 1
src/main/java/com/example/backend/entity/pccontract/PCcontractRCenterDtl.java Näytä tiedosto

@@ -8,7 +8,7 @@ import lombok.Data;
8 8
 import java.math.BigDecimal;
9 9
 
10 10
 @Data
11
-@TableName("SGGMINFT.rCenterDtl")
11
+@TableName("SGGMIIP.rCenterDtl")
12 12
 public class PCcontractRCenterDtl extends BaseModelPur {
13 13
 
14 14
     private static final long serialVersionUID = 1L;
@@ -29,6 +29,9 @@ public class PCcontractRCenterDtl extends BaseModelPur {
29 29
     @TableField("assessRatio")
30 30
     private BigDecimal assessRatio;
31 31
 
32
+    @TableField("assessQtyRate")
33
+    private BigDecimal assessQtyRate;
34
+
32 35
     @TableField("assessAmt")
33 36
     private BigDecimal assessAmt;
34 37
 

+ 5
- 1
src/main/java/com/example/backend/entity/pccontract/PurchaseContract.java Näytä tiedosto

@@ -16,7 +16,7 @@ import java.util.List;
16 16
  * 销售合同主表
17 17
  */
18 18
 @Data
19
-@TableName("SGGMINFT.purchaseContract")
19
+@TableName("SGGMIIP.purchaseContract")
20 20
 public class PurchaseContract extends BaseModelPur {
21 21
 
22 22
     private static final long serialVersionUID = 1L;
@@ -314,6 +314,9 @@ public class PurchaseContract extends BaseModelPur {
314 314
     @TableField("rateUsd")
315 315
     private BigDecimal rateUsd;
316 316
 
317
+    @TableField("rateUs")
318
+    private BigDecimal rateUs;
319
+
317 320
     @TableField("WhetherChartering")
318 321
     private String WhetherChartering;
319 322
 
@@ -346,4 +349,5 @@ public class PurchaseContract extends BaseModelPur {
346 349
 
347 350
     @TableField("fchno")
348 351
     private int fchno;
352
+
349 353
 }

+ 1
- 1
src/main/java/com/example/backend/excel/PcContract/PcContractDtlDto.java Näytä tiedosto

@@ -14,7 +14,7 @@ public class PcContractDtlDto {
14 14
     @ExcelProperty("批次号")
15 15
     private String batchNo;
16 16
 
17
-    @ExcelProperty("商品编")
17
+    @ExcelProperty("商品编")
18 18
     private String itemno;
19 19
 
20 20
     @ExcelProperty("规格描述")

+ 3
- 3
src/main/java/com/example/backend/excel/PcContract/PcContractMainDto.java Näytä tiedosto

@@ -40,16 +40,16 @@ public class PcContractMainDto {
40 40
     @ExcelProperty("数量短装%")
41 41
     private BigDecimal qtyShort;
42 42
 
43
-    @ExcelProperty("金额溢装%")
43
+    @ExcelProperty("金额溢装")
44 44
     private BigDecimal amtOver;
45 45
 
46
-    @ExcelProperty("金额短装%")
46
+    @ExcelProperty("金额短装")
47 47
     private BigDecimal amtShort;
48 48
 
49 49
     @ExcelProperty("币别")
50 50
     private String curcy;
51 51
 
52
-    @ExcelProperty("最迟装运日期")
52
+    @ExcelProperty("最迟装运时间")
53 53
     @DateTimeFormat("yyyy-MM-dd")
54 54
     private Date estLoadDt;
55 55
 

+ 48
- 40
src/main/java/com/example/backend/service/contract/impl/PurchaseContractServiceImpl.java Näytä tiedosto

@@ -142,7 +142,7 @@ public class PurchaseContractServiceImpl implements PurchaseContractService {
142 142
      */
143 143
     private Map<String, List<PcContractDtlDto>> buildDtlMap(List<PcContractDtlDto> excel_dtl) {
144 144
         Map<String, List<PcContractDtlDto>> map = new HashMap<>();
145
-        if (excel_dtl != null) {
145
+        if (excel_dtl != null ) {
146 146
             for (PcContractDtlDto dtl : excel_dtl) {
147 147
                 if (dtl.getPono() != null && !dtl.getPono().trim().isEmpty()) {
148 148
                     map.computeIfAbsent(dtl.getPono(), k -> new ArrayList<>()).add(dtl);
@@ -265,11 +265,11 @@ public class PurchaseContractServiceImpl implements PurchaseContractService {
265 265
                 String code = mainItem.getSupName().substring(mainItem.getSupName().indexOf("-") + 1);
266 266
                 mainItem.setSupName(code);
267 267
                 GongYingNameList = sysUserMapper.selectByGongYingName(code);
268
-                if (GongYingNameList != null && !GongYingNameList.isEmpty() && !"2".equals(GongYingNameList.get(0).getPlaced())) {
268
+                if (GongYingNameList == null ||  GongYingNameList.isEmpty() ) {
269 269
                     errorMsg.append("供应商名称没有审批通过; ");
270 270
                 }
271 271
                 if (GongYingNameList != null && !GongYingNameList.isEmpty() && GongYingNameList.get(0).getFno().isEmpty()) {
272
-                    errorMsg.append("供应商代没有审批通过; ");
272
+                    errorMsg.append("供应商代没有审批通过; ");
273 273
                 }
274 274
             }
275 275
             if (mainItem.getCurcy() == null || mainItem.getCurcy().trim().isEmpty()) {
@@ -311,11 +311,11 @@ public class PurchaseContractServiceImpl implements PurchaseContractService {
311 311
                     (mainItem.getServiceType() != null && mainItem.getServiceType().contains("主业")))) &&
312 312
                     (mainItem.getLPort() == null || mainItem.getLPort().trim().isEmpty())) {
313 313
                 errorMsg.append("装运港不能为空; ");
314
-            }else if (mainItem.getLPort() == null && mainItem.getLPort().trim().isEmpty()){
314
+            }else if (mainItem.getLPort() != null && !mainItem.getLPort().trim().isEmpty()){
315 315
                 lPortList = custCtrlMapper.selectLPortByLportName(mainItem.getLPort());
316 316
                 if (lPortList == null || lPortList.isEmpty()) {
317 317
                     errorMsg.append("装运港信息有误; ");
318
-                } else if (lPortList != null && !lPortList.isEmpty() && (lPortList.get(0).getCountryName()== null || lPortList.get(0).getCountryName().isEmpty())) {
318
+                } else if (lPortList != null && !lPortList.isEmpty() && (lPortList.get(0).getCountryCnNm()== null || lPortList.get(0).getCountryCnNm().isEmpty())) {
319 319
                     errorMsg.append("装运港维护信息有误; ");
320 320
                 }
321 321
             }
@@ -325,11 +325,11 @@ public class PurchaseContractServiceImpl implements PurchaseContractService {
325 325
                     (mainItem.getServiceType() != null && mainItem.getServiceType().contains("主业")))) &&
326 326
                     (mainItem.getDPort() == null || mainItem.getDPort().trim().isEmpty())) {
327 327
                 errorMsg.append("目的港不能为空; ");
328
-            }else if (mainItem.getDPort() == null && mainItem.getDPort().trim().isEmpty()){
328
+            }else if (mainItem.getDPort() != null && !mainItem.getDPort().trim().isEmpty()){
329 329
                 dPortList = custCtrlMapper.selectLPortByLportName(mainItem.getDPort());
330 330
                 if (dPortList == null || dPortList.isEmpty()) {
331 331
                     errorMsg.append("目的港信息有误; ");
332
-                } else if (dPortList != null && !dPortList.isEmpty() && (dPortList.get(0).getCountryName()== null || dPortList.get(0).getCountryName().isEmpty())) {
332
+                } else if (dPortList != null && !dPortList.isEmpty() && (dPortList.get(0).getCountryCnNm()== null || dPortList.get(0).getCountryCnNm().isEmpty())) {
333 333
                     errorMsg.append("目的港维护信息有误; ");
334 334
                 }
335 335
             }
@@ -434,13 +434,13 @@ public class PurchaseContractServiceImpl implements PurchaseContractService {
434 434
                     if (pay.getPayType()  == null || pay.getPayType().trim().isEmpty()){
435 435
                         errorMsg.append("付款计划中款项类别不能为空; ");
436 436
                     } else if (pay.getPayType() != null && !pay.getPayType().trim().isEmpty()) {
437
-                        validateSingleDictField(mainItem.getTerms(), "合同计划-款项类型", "合同计划-款项类型", allDicts, errorMsg);
437
+                        validateSingleDictField(pay.getPayType(), "合同计划-款项类型", "合同计划-款项类型", allDicts, errorMsg);
438 438
                     }
439 439
 
440 440
                     if (pay.getPayMethod()  == null || pay.getPayMethod().trim().isEmpty()){
441 441
                         errorMsg.append("付款计划中付款方式不能为空; ");
442 442
                     } else if (pay.getPayMethod() != null && !pay.getPayMethod().trim().isEmpty()) {
443
-                        validateSingleDictField(mainItem.getTerms(), "合同计划-付款方式", "合同计划-付款方式", allDicts, errorMsg);
443
+                        validateSingleDictField(pay.getPayMethod(), "合同计划-付款方式", "合同计划-付款方式", allDicts, errorMsg);
444 444
                     }
445 445
 
446 446
                     if (pay.getPayDays()  == null || pay.getPayDays().toString().trim().isEmpty()){
@@ -522,8 +522,9 @@ public class PurchaseContractServiceImpl implements PurchaseContractService {
522 522
         contract.setServiceType(mainItem.getServiceType());
523 523
         contract.setBizType(mainItem.getBizType());
524 524
         contract.setBizProductType(mainItem.getBizProductType());
525
+        contract.setPriceCls(mainItem.getTerms());
525 526
         //根据查询“我方信息”结果填入部分数据
526
-        contract.setFoursname(wofangNameList.get(0).getCountryName());
527
+        contract.setFoursname(wofangNameList.get(0).getCpny());
527 528
         contract.setFours(wofangNameList.get(0).getFno());
528 529
         contract.setOurBankNm(wofangNameList.get(0).getOurBankNm());
529 530
         contract.setOurBankAcct(wofangNameList.get(0).getOurBankAcct());
@@ -540,7 +541,7 @@ public class PurchaseContractServiceImpl implements PurchaseContractService {
540 541
         //根据查询到的“币别”信息填入数据
541 542
         contract.setCurcy(curcyList.get(0).getFname());
542 543
         contract.setRate(curcyList.get(0).getRate());
543
-        contract.setRateUsd(curcyList.get(0).getRateUs());
544
+        contract.setRateUs(curcyList.get(0).getRateUs());
544 545
         //根据查询到的“执行人”信息填入数据
545 546
         contract.setContrExecNm(ZhixingUserByList.get(0).getUserCode());
546 547
         contract.setContrExecNm(ZhixingUserByList.get(0).getUserDesc());
@@ -585,6 +586,8 @@ public class PurchaseContractServiceImpl implements PurchaseContractService {
585 586
         contract.setIfBidding("否");
586 587
 
587 588
         contract.setRemark("期初导入-采购");
589
+        contract.setFmodalid(8);
590
+        contract.setPlaced("0");
588 591
 
589 592
         purchaseContracts.add(contract);
590 593
 
@@ -598,11 +601,14 @@ public class PurchaseContractServiceImpl implements PurchaseContractService {
598 601
                 dtl.setSdesc(itemnoList.get(0).getSdesc());
599 602
                 dtl.setBrand(itemnoList.get(0).getBrand());
600 603
                 dtl.setFtype3(dtlDto.getSpec());
601
-                dtl.setUt(dtl.getUt());
604
+                dtl.setUt(dtlDto.getUt());
602 605
                 dtl.setQty(dtlDto.getQty());
603
-                dtl.setPoPrice(dtl.getPoPrice());
604
-                dtl.setMoisture(dtl.getMoisture());
605
-                dtl.setPriceMode(dtl.getPriceMode());
606
+                dtl.setPoPrice(dtlDto.getPoprice());
607
+                dtl.setMoisture(dtlDto.getMoisture());
608
+                dtl.setPriceMtd(dtlDto.getPriceMtd());
609
+                dtl.setInputTaxRate(dtlDto.getInTaxRate());
610
+                dtl.setIronCont(dtlDto.getIronCont());
611
+                dtl.setPoAmt(dtlDto.getPoamt());
606 612
 
607 613
                 pCcontractDtls.add(dtl);
608 614
             }
@@ -617,8 +623,8 @@ public class PurchaseContractServiceImpl implements PurchaseContractService {
617 623
                 payment.setPayType(payDto.getPayType());
618 624
                 payment.setPayMethod(payDto.getPayMethod());
619 625
                 payment.setPayRatio(payDto.getPayRatio());
620
-                payment.setPayAmt(payment.getPayAmt());
621
-                payment.setPayDays(payment.getPayDays());
626
+                payment.setPayAmt(String.valueOf(payDto.getPayAmt()));
627
+                payment.setPayDays(String.valueOf(payDto.getPayDays()));
622 628
                 pCcontractPayments.add(payment);
623 629
             }
624 630
         }
@@ -626,33 +632,35 @@ public class PurchaseContractServiceImpl implements PurchaseContractService {
626 632
         // 转换责任中心数据
627 633
         if (rcentList != null) {
628 634
             for (PcContractRCentDto rcentDto : rcentList) {
629
-                PCcontractRCenterDtl rcent = convertToPCcontractRCenterDtl(rcentDto);
635
+                PCcontractRCenterDtl rcent = new PCcontractRCenterDtl();
636
+                rcent.setPono(mainItem.getPono());
637
+                rcent.setCreateBy(rcentDto.getCreate_by());
638
+                List<SysUser> createByList = sysUserMapper.selectByCreateBy(rcentDto.getCreate_by());
639
+                if (createByList != null && !createByList.isEmpty()) {
640
+                    rcent.setDeptId(createByList.get(0).getDeptCode());
641
+                    rcent.setDeptName(createByList.get(0).getDeptName());
642
+                    rcent.setCreateByName(createByList.get(0).getUserDesc());
643
+                }
644
+                rcent.setAssessQtyRate(rcentDto.getAssessQtyRate());
645
+                rcent.setAssessRatio(rcentDto.getAssessRatio());
630 646
                 pCcontractRCenterDtls.add(rcent);
631 647
             }
648
+        }else {
649
+            PCcontractRCenterDtl rcent = new PCcontractRCenterDtl();
650
+            rcent.setPono(mainItem.getPono());
651
+            rcent.setCreateBy(mainItem.getCreate_by());
652
+            List<SysUser> createByList = sysUserMapper.selectByCreateBy(mainItem.getCreate_by());
653
+            if (createByList != null && !createByList.isEmpty()) {
654
+                rcent.setDeptId(createByList.get(0).getDeptCode());
655
+                rcent.setDeptName(createByList.get(0).getDeptName());
656
+                rcent.setCreateByName(createByList.get(0).getUserDesc());
657
+            }
658
+            rcent.setAssessQtyRate(new BigDecimal(100));
659
+            rcent.setAssessRatio(new BigDecimal(100));
660
+            pCcontractRCenterDtls.add(rcent);
632 661
         }
633 662
     }
634 663
 
635
-
636
-    /**
637
-     * 转换付款计划数据
638
-     */
639
-    private PCcontractPayment convertToPCcontractPayment(PcContractPayDto dto) {
640
-        PCcontractPayment payment = new PCcontractPayment();
641
-
642
-
643
-        return payment;
644
-    }
645
-
646
-    /**
647
-     * 转换责任中心数据
648
-     */
649
-    private PCcontractRCenterDtl convertToPCcontractRCenterDtl(PcContractRCentDto dto) {
650
-        PCcontractRCenterDtl rcent = new PCcontractRCenterDtl();
651
-
652
-
653
-        return rcent;
654
-    }
655
-
656 664
     /**
657 665
      * 创建合同错误信息对象
658 666
      */
@@ -741,7 +749,7 @@ public class PurchaseContractServiceImpl implements PurchaseContractService {
741 749
     private void saveContractDetails(String mainId, List<PCcontractDtl> dtlList, String pono) {
742 750
         for (PCcontractDtl dtl : dtlList) {
743 751
             if (pono.equals(dtl.getPono())) {
744
-                dtl.setRid(mainId);
752
+                dtl.setRrid(mainId);
745 753
                 pCcontractDtlMapper.insert(dtl);
746 754
             }
747 755
         }

+ 7
- 7
src/main/java/com/example/backend/util/PcExcelUtil.java Näytä tiedosto

@@ -23,9 +23,9 @@ public class PcExcelUtil {
23 23
     public static List<PcContractMainDto> readPcMainExcelSync(MultipartFile file) {
24 24
         try (InputStream inputStream = file.getInputStream()) {
25 25
             return EasyExcel.read(inputStream)
26
-                    .head(PcContractPayDto.class)
26
+                    .head(PcContractMainDto.class)
27 27
                     .sheet("合同主表")
28
-                    .headRowNumber(4)
28
+                    .headRowNumber(1)
29 29
                     .doReadSync();
30 30
         } catch (IOException e) {
31 31
             System.out.println("读取Excel文件失败: " + e.getMessage());
@@ -40,9 +40,9 @@ public class PcExcelUtil {
40 40
     public static List<PcContractDtlDto> readPcDtlExcelSync(MultipartFile file) {
41 41
         try (InputStream inputStream = file.getInputStream()) {
42 42
             return EasyExcel.read(inputStream)
43
-                    .head(PcContractPayDto.class)
43
+                    .head(PcContractDtlDto.class)
44 44
                     .sheet("合同商品明细")
45
-                    .headRowNumber(3)
45
+                    .headRowNumber(1)
46 46
                     .doReadSync();
47 47
         } catch (IOException e) {
48 48
             System.out.println("读取Excel文件失败: " + e.getMessage());
@@ -59,7 +59,7 @@ public class PcExcelUtil {
59 59
             return EasyExcel.read(inputStream)
60 60
                     .head(PcContractPayDto.class)
61 61
                     .sheet("付款计划")
62
-                    .headRowNumber(3)
62
+                    .headRowNumber(1)
63 63
                     .doReadSync();
64 64
         } catch (IOException e) {
65 65
             System.out.println("读取Excel文件失败: " + e.getMessage());
@@ -74,9 +74,9 @@ public class PcExcelUtil {
74 74
     public static List<PcContractRCentDto> readPcRcentExcelSync(MultipartFile file) {
75 75
         try (InputStream inputStream = file.getInputStream()) {
76 76
             return EasyExcel.read(inputStream)
77
-                    .head(PcContractPayDto.class)
77
+                    .head(PcContractRCentDto.class)
78 78
                     .sheet("责任中心")
79
-                    .headRowNumber(3)
79
+                    .headRowNumber(1)
80 80
                     .doReadSync();
81 81
         } catch (IOException e) {
82 82
             System.out.println("读取Excel文件失败: " + e.getMessage());

+ 2
- 2
src/main/resources/application.yml Näytä tiedosto

@@ -11,8 +11,8 @@ spring:
11 11
       max-request-size: 10MB
12 12
   datasource:
13 13
     driver-class-name: dm.jdbc.driver.DmDriver
14
-    url: jdbc:dm://10.19.14.22:5236
15
-    username: SGGMINFT
14
+    url: jdbc:dm://10.19.13.211:5236
15
+    username: SGGMIIP
16 16
     password: SXxxjsgs2025
17 17
     druid:
18 18
       initial-size: 5

+ 27
- 39
src/main/resources/mapper/SysUserMapper.xml Näytä tiedosto

@@ -49,49 +49,37 @@
49 49
 
50 50
 
51 51
     <select id="selectByGongYingName" resultType="com.example.backend.entity.common.SysUser">
52
-        select a.id,
53
-               a.fno,
54
-               a.rptg,
55
-               a.ctCnNm,
56
-               a.ctEnNm,
57
-               case
58
-                   when IFNULL(ctAbbr, '') = '' then IFNULL(ctEnAbbr, '')
59
-                   else IFNULL(ctAbbr, '')
60
-                   end                                                                 as cpal
61
-                ,
62
-               case
63
-                   when IFNULL(ctCnNm, '') = '' then IFNULL(ctEnNm, '')
64
-                   else IFNULL(ctCnNm, '')
65
-                   end                                                                 as cpny
66
-                ,
67
-               case
68
-                   when IFNULL(ctCnAddr, '') = '' then IFNULL(ctEnAddr, '')
69
-                   else IFNULL(ctCnAddr, '')
70
-                   end                                                                 as addr,
71
-               a.ctrylmbAddr,
72
-               estabDt,
73
-               ctLevel,
74
-               a.tel
75
-                ,
76
-               a.email,
77
-               case when nvl(b.bankNm, '') = '' then '' else nvl(b.bankNm, '') end     as ctBankName,
78
-               case when nvl(b.bankAcct, '') = '' then '' else nvl(b.bankAcct, '') end as ctBankAcct,
79
-               case when nvl(c.name, '') = '' then '' else nvl(c.name, '') end         as ctContNm
80
-
81
-        from custctrl a
82
-                 LEFT JOIN (SELECT rid, bankNm, bankAcct, ROW_NUMBER() OVER (PARTITION BY rid ORDER BY id) as row_num
83
-                            FROM custbank
84
-                            WHERE NVL(del_flag, 0) != 1) b ON a.id = b.rid AND b.row_num = 1
85
-                 left join custattn c on a.id = c.rid
52
+        select a.id, a.fno,a.rptg,a.ctCnNm,a.ctEnNm,
53
+        case
54
+        when IFNULL(ctAbbr, '') = '' then IFNULL(ctEnAbbr, '')
55
+        else IFNULL(ctAbbr, '')
56
+        end as cpal
57
+        , case
58
+        when IFNULL(ctCnNm, '') = '' then IFNULL(ctEnNm, '')
59
+        else IFNULL(ctCnNm, '')
60
+        end as cpny
61
+        , case
62
+        when IFNULL(ctCnAddr, '') = '' then IFNULL(ctEnAddr, '')
63
+        else IFNULL(ctCnAddr, '')
64
+        end as addr, a.ctrylmbAddr, estabDt, ctLevel, a.tel
65
+        , a.email,
66
+        case when nvl(b.bankNm,'')='' then '' else  nvl(b.bankNm,'')  end  as ctBankName,
67
+        case when nvl(b.bankAcct,'')='' then '' else  nvl(b.bankAcct,'')  end  as ctBankAcct,
68
+        case when nvl(c.name,'')='' then '' else  nvl(c.name,'')  end  as ctContNm
69
+        from SGGMIIP.custctrl a
70
+        LEFT JOIN (
71
+        SELECT  rid , bankNm , bankAcct , ROW_NUMBER() OVER (PARTITION BY rid ORDER BY id) as row_num
72
+        FROM SGGMIIP.custbank   WHERE NVL(del_flag, 0) != 1
73
+        ) b ON a.id = b.rid AND b.row_num = 1
74
+        left join SGGMIIP.custattn c on a.id = c.rid
86 75
         where ifnull(a.del_flag, 0) != 1
87
-          and (checkPermission('客商管理', a) or a.rptg is null or a.rptg = '')
88
-          and INSTR(ctNature, '供应商') > 0
89
-          and nvl(ctStatus, '') = '已准入'
90
-          and a.ctCnNm = #{ctName}
76
+        and INSTR(ctNature, '供应商') > 0
77
+        and nvl(ctStatus,'')='已准入'
78
+        and a.ctCnNm = #{ctName}
91 79
         order by a.fno
92 80
     </select>
93 81
     <select id="selectByCreateBy" resultType="com.example.backend.entity.common.SysUser">
94
-        select a.id, a.dept_code as deptCode, a.DEPT_NAME, c.user_desc, c.USER_CODE
82
+        select a.id,a.dept_code as deptCode, a.DEPT_NAME,c.user_desc,c.USER_CODE
95 83
         from SGGMIIP.SYS_DEPARTMENT a
96 84
                  join SGGMIIP.SYS_USER_DEPARTMENT b on a.id = b.DEPT_ID
97 85
                  join SGGMIIP.SYS_USER c on b.USER_ID = c.id

Loading…
Peruuta
Tallenna