Browse Source

Merge remote-tracking branch 'origin/dev1.0' into dev1.0

liuj 8 months ago
parent
commit
4b8e601e2b

+ 3 - 3
src/main/java/com/sunxung/factoring/entity/invoicemanage/PurchaseInvoiceHisInfo.java

@@ -30,7 +30,7 @@ public class PurchaseInvoiceHisInfo extends BaseEntity {
      **/
     @NotNull(message = "数量")
     @TableField(value = "invoice_num")
-    private Long nvoiceNum;
+    private BigDecimal nvoiceNum;
     /**
      * 金额
      */
@@ -72,11 +72,11 @@ public class PurchaseInvoiceHisInfo extends BaseEntity {
         this.nvoiceNumber = nvoiceNumber;
     }
 
-    public Long getNvoiceNum() {
+    public BigDecimal getNvoiceNum() {
         return nvoiceNum;
     }
 
-    public void setNvoiceNum(Long nvoiceNum) {
+    public void setNvoiceNum(BigDecimal nvoiceNum) {
         this.nvoiceNum = nvoiceNum;
     }
 

+ 3 - 3
src/main/java/com/sunxung/factoring/entity/invoicemanage/PurchaseInvoiceInfo.java

@@ -30,7 +30,7 @@ public class PurchaseInvoiceInfo extends BaseEntity {
      **/
     @NotNull(message = "数量")
     @TableField(value = "invoice_num")
-    private Long nvoiceNum;
+    private BigDecimal nvoiceNum;
     /**
      * 金额
      */
@@ -72,11 +72,11 @@ public class PurchaseInvoiceInfo extends BaseEntity {
         this.nvoiceNumber = nvoiceNumber;
     }
 
-    public Long getNvoiceNum() {
+    public BigDecimal getNvoiceNum() {
         return nvoiceNum;
     }
 
-    public void setNvoiceNum(Long nvoiceNum) {
+    public void setNvoiceNum(BigDecimal nvoiceNum) {
         this.nvoiceNum = nvoiceNum;
     }
 

+ 2 - 0
src/main/java/com/sunxung/factoring/entity/sys/vo/ClientUserVO.java

@@ -23,6 +23,8 @@ public class ClientUserVO {
 
   private String cityName;
 
+  private String enterpriseAddress;
+
   /**
    *  主体企业信息
    */

+ 2 - 0
src/main/java/com/sunxung/factoring/service/customerinformation/IElectronicSignaturePersonalService.java

@@ -73,4 +73,6 @@ public interface IElectronicSignaturePersonalService extends IService<Electronic
      * @return
      */
     GridPage findByComName(String name,Integer status, Integer page, Integer rows);
+
+    void flush(Long id);
 }

+ 12 - 4
src/main/java/com/sunxung/factoring/service/customerinformation/impl/ElectronicSignaturePersonalServiceImpl.java

@@ -5,10 +5,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.github.pagehelper.Page;
 import com.github.pagehelper.PageHelper;
 import com.sunxung.factoring.component.exception.ValidatorException;
-import com.sunxung.factoring.component.util.CodeUtil;
-import com.sunxung.factoring.component.util.CollectionUtil;
-import com.sunxung.factoring.component.util.ElectronicSignatureUtil;
-import com.sunxung.factoring.component.util.StringUtil;
+import com.sunxung.factoring.component.util.*;
 import com.sunxung.factoring.entity.GridPage;
 import com.sunxung.factoring.entity.acceptance.AcceptanceSignConfirmationElectronicInfo;
 import com.sunxung.factoring.entity.customerinformation.ElectronicSignaturePersonal;
@@ -59,6 +56,17 @@ public class ElectronicSignaturePersonalServiceImpl extends ServiceImpl<Electron
         return new GridPage(rows,page,objectPage.getTotal(),list);
     }
 
+    @Override
+    public void flush(Long id) {
+        ElectronicSignaturePersonal electronicSignaturePersonal = getById(id);
+        //获取认证状态
+        String result = ElectronicSignatureUtil.getAuthInfo(electronicSignaturePersonal.getFddCustomerId(), "1");
+        if ("1".equals(result)){
+            electronicSignaturePersonal.setAuthStatus(1);
+            updateById(electronicSignaturePersonal);
+        }
+    }
+
     @Override
     public List<ElectronicSignaturePersonal> findByIdForC(Long id) {
         List<ElectronicSignaturePersonal> list ;

+ 1 - 1
src/main/java/com/sunxung/factoring/service/sys/impl/OrgServiceImpl.java

@@ -110,7 +110,7 @@ public class OrgServiceImpl implements OrgService {
         List<OrgTreeNode> orgTreeNodes = buidTree(trees, 0L);
         if(orgTreeNodes.size()>2){
             orgTreeNodes.remove(1);
-            orgTreeNodes.remove(1);
+           // orgTreeNodes.remove(1);
         }
         return orgTreeNodes;
     }

+ 14 - 0
src/main/java/com/sunxung/factoring/web/customerinformation/ElectronicSignaturePersonalController.java

@@ -120,4 +120,18 @@ public class ElectronicSignaturePersonalController {
         return new ResponseJson("删除成功!");
     }
 
+
+
+    /**
+     * 刷新认证状态
+     * @return
+     */
+    @RequestMapping("flush")
+    @ResponseBody
+    @OperationLog(operationModule = "电子签个人",operationType = OperationTypeEnum.UPDATE,description = "刷新认证")
+    public ResponseJson flush(Long id) {
+        electronicSignaturePersonalService.flush(id);
+        return new ResponseJson("刷新成功");
+    }
+
 }

+ 10 - 3
src/main/java/com/sunxung/factoring/web/invoicemanage/InvoiceApprovalController.java

@@ -1,5 +1,6 @@
 package com.sunxung.factoring.web.invoicemanage;
 
+import cn.hutool.core.collection.CollectionUtil;
 import com.sunxung.factoring.component.annotation.OperationLog;
 import com.sunxung.factoring.component.enums.OperationTypeEnum;
 import com.sunxung.factoring.component.util.ConstantUtil;
@@ -11,6 +12,7 @@ import com.sunxung.factoring.entity.ValidatorEntity;
 import com.sunxung.factoring.entity.invoicemanage.InvoiceApproval;
 import com.sunxung.factoring.entity.invoicemanage.SalesInvoiceInfo;
 import com.sunxung.factoring.service.invoicemanage.InvoiceApprovalService;
+import com.sunxung.factoring.service.sys.UserService;
 import com.sunxung.factoring.service.sys.flowable.FlowableService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
@@ -18,6 +20,7 @@ import org.springframework.ui.Model;
 import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletRequest;
+import java.util.List;
 
 /**
  * @Description : 销售发票审核controller层
@@ -36,6 +39,8 @@ public class InvoiceApprovalController {
 
     @Autowired
     private FlowableService flowableService;
+    @Autowired
+    private UserService userService;
 
 
     /**
@@ -70,10 +75,12 @@ public class InvoiceApprovalController {
         SalesInvoiceInfo salesInvoiceInfo = invoiceApproval.getSalesInvoiceInfo();
         String taskId = invoiceApproval.getTaskId();
         String businessKey = invoiceApproval.getBusinessKey();
-        if(salesInvoiceInfo == null){
-            flowableService.claimTask(taskId, ThreadLocalUtil.getUserId(), ConstantUtil.PROJECT_MANAGER);
+        Long userId = ThreadLocalUtil.getUserId();
+        List<Long> userIds = userService.findUserIdByRole(ConstantUtil.PROJECT_MANAGER);
+        if(CollectionUtil.isNotEmpty(userIds) && userIds.contains(userId)){
+            flowableService.claimTask(taskId, userId, ConstantUtil.PROJECT_MANAGER);
         }else {
-            flowableService.claimTask(taskId, ThreadLocalUtil.getUserId(), ConstantUtil.CASHIER);
+            flowableService.claimTask(taskId, userId, ConstantUtil.CASHIER);
         }
         invoiceApprovalService.audit(invoiceApproval, businessKey, taskId, request);
         return new ResponseJson("审核完成");

+ 1 - 0
src/main/resources/mapper/sys/ClientUserMapper.xml

@@ -12,6 +12,7 @@
 			a.mobile "phone",
 			d.name "provinceName",
 			e.name "cityName",
+		  a.enterprise_address,
 			a.gmt_create,
 			b.`name` "project_manager",
 			c.`name` "risk_manager"

+ 3 - 0
src/main/resources/mapper/sys/UserMapper.xml

@@ -385,6 +385,9 @@
 	<select id="countUserOrgRelByOrgCode" parameterType="java.lang.String" resultType="java.lang.Integer">
 		select count(1) from (
 	  		select DISTINCT user_id from sys_user_org_rel rel where rel.org_code like CONCAT(#{orgCode},'%')
+		    <if test="orgCode!='.888.' ">
+					and  rel.org_code !='.888.'
+				</if>
 		)aa
 	</select>