‘linchangsheng’ 10 months ago
parent
commit
a8d30d8652

+ 3 - 1
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/logic/policy/WorkerLogic.java

@@ -383,6 +383,8 @@ public class WorkerLogic {
 
         String source = StringUtil.isEmpty(commonLogic.getSource())?"B":commonLogic.getSource();
 
+        String miniOpenId = commonLogic.getMiniOpenId();
+
         PayDetail payDetail = new PayDetail();
 
         PolicyOrder policyOrder = policyOrderService.getById(policyOrderId);
@@ -397,7 +399,7 @@ public class WorkerLogic {
                     "N", ip, adminWebsit.getPayInsureCodeId());
         } else {
             payDetail = wechatLogic.paymentWebsit(policyOrder.getId(), policyOrder.getPayAmount(),
-                    currentCompanyWechat.getUser().getOpenId(),
+                    miniOpenId,
                     "N", ip, adminWebsit.getPayInsureCodeId(), true);
         }
 

+ 15 - 0
mall-server-api/src/main/java/com/gree/mall/manager/controller/policy/PolicyOrderController.java

@@ -12,6 +12,7 @@ import com.gree.mall.manager.exception.RemoteServiceException;
 import com.gree.mall.manager.helper.ResponseHelper;
 import com.gree.mall.manager.logic.policy.PolicyOrderLogic;
 import com.gree.mall.manager.plus.entity.PolicyOrder;
+import com.gree.mall.manager.utils.excel.ExcelUtils;
 import com.gree.mall.manager.zfire.bean.ZfireParamBean;
 import com.gree.mall.manager.zfire.util.FieldUtils;
 import io.swagger.annotations.Api;
@@ -20,10 +21,13 @@ import io.swagger.annotations.ApiParam;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
 import java.text.ParseException;
+import java.util.List;
 
 @Slf4j
 @RestController
@@ -136,5 +140,16 @@ public class PolicyOrderController {
     }
 
 
+    @PostMapping("/import")
+    @ApiOperation(value = "工伤保险导入购买")
+    public ResponseHelper wait2Del(
+            @RequestParam MultipartFile file
+    ) throws RemoteServiceException, IOException {
+        List<Object> objects = ExcelUtils.importExcel(file);
+        policyOrderLogic.importData(objects);
+        return ResponseHelper.success();
+    }
+
+
 
 }

+ 7 - 0
mall-server-api/src/main/java/com/gree/mall/manager/logic/policy/PolicyOrderLogic.java

@@ -80,4 +80,11 @@ public class PolicyOrderLogic {
     public void update(PolicyOrder policyOrder) {
         policyOrder.updateById();
     }
+
+    public void importData(List<Object> objects) {
+
+        for (Object o : objects) {
+            String websitNumber = (String) row.get(0);
+        }
+    }
 }