ZeroLiYi пре 1 година
родитељ
комит
fc40a887a6

+ 2 - 6
src/main/java/com/chinaitop/depot/sqr/controller/BizSqrEnterpriseApplyController.java

@@ -97,14 +97,10 @@ public class BizSqrEnterpriseApplyController {
97
      */
97
      */
98
     @ApiOperation("新增承储资格申请")
98
     @ApiOperation("新增承储资格申请")
99
     @PostMapping("/add")
99
     @PostMapping("/add")
100
-    @ApiImplicitParams({
101
-            @ApiImplicitParam(name = "bizSqrEnterpriseApplyJson", value = "JSON数据对象", paramType = "form"),
102
-            @ApiImplicitParam(name = "userInfo", value = "JSON登录对象", paramType = "form")
103
-    })
104
-    public Map<String, Object> save(HttpServletRequest request, String bizSqrEnterpriseApplyJson, String userInfo) {
100
+    public Map<String, Object> save(@RequestBody BizSqrEnterpriseApply bizSqrEnterpriseApply) {
105
         Map<String, Object> modelMap = new HashMap<>();
101
         Map<String, Object> modelMap = new HashMap<>();
106
         try {
102
         try {
107
-            modelMap = bizGrQeApplyService.saveOrUpdate(request, bizSqrEnterpriseApplyJson, userInfo);
103
+            modelMap = bizGrQeApplyService.saveOrUpdate(bizSqrEnterpriseApply);
108
         } catch (Exception e) {
104
         } catch (Exception e) {
109
             e.printStackTrace();
105
             e.printStackTrace();
110
             modelMap.put("status", "error");
106
             modelMap.put("status", "error");

+ 2 - 2
src/main/java/com/chinaitop/depot/sqr/service/BizSqrEnterpriseApplyService.java

@@ -43,12 +43,12 @@ public interface BizSqrEnterpriseApplyService {
43
 
43
 
44
     /**
44
     /**
45
      * 新增申请
45
      * 新增申请
46
-     * @param bizSqrEnterpriseApplyJson
46
+     * @param bizSqrEnterpriseApply
47
      *
47
      *
48
      */
48
      */
49
 
49
 
50
 
50
 
51
-    public Map<String, Object> saveOrUpdate(HttpServletRequest request, String bizSqrEnterpriseApplyJson, String userInfo) throws Exception;
51
+    public Map<String, Object> saveOrUpdate(BizSqrEnterpriseApply bizSqrEnterpriseApply) throws Exception;
52
 
52
 
53
     void remove(Integer applyType,String unitInfoId,Integer enterpriseApplyId);
53
     void remove(Integer applyType,String unitInfoId,Integer enterpriseApplyId);
54
 
54
 

+ 2 - 8
src/main/java/com/chinaitop/depot/sqr/service/impl/BizSqrEnterpriseApplyServiceImpl.java

@@ -109,7 +109,7 @@ public class BizSqrEnterpriseApplyServiceImpl implements BizSqrEnterpriseApplySe
109
 
109
 
110
     @Override
110
     @Override
111
     @Transactional
111
     @Transactional
112
-    public Map<String, Object> saveOrUpdate(HttpServletRequest request, String bizSqrEnterpriseApplyJson, String userInfo) throws Exception {
112
+    public Map<String, Object> saveOrUpdate(BizSqrEnterpriseApply bizSqrEnterpriseApply) throws Exception {
113
         Map<String, Object> modelMap = new HashMap<String, Object>();
113
         Map<String, Object> modelMap = new HashMap<String, Object>();
114
         JSONObject user = null;
114
         JSONObject user = null;
115
         JSONObject org = null;
115
         JSONObject org = null;
@@ -117,24 +117,18 @@ public class BizSqrEnterpriseApplyServiceImpl implements BizSqrEnterpriseApplySe
117
         String userName = "";
117
         String userName = "";
118
         Map<String, Object> modelMap1 = new HashMap<String, Object>();
118
         Map<String, Object> modelMap1 = new HashMap<String, Object>();
119
         //获取单位信息
119
         //获取单位信息
120
-        String orgInfo = ObjectUtils.toString(request.getSession().getAttribute("orgInfo"),"");
121
         String dwbm = "";
120
         String dwbm = "";
122
         String ajbm ="";
121
         String ajbm ="";
123
-        if (null != orgInfo && !"".equals(orgInfo)) {
124
-            org = JSONObject.parseObject(orgInfo);
125
-            dwbm = org.get("creditCode") == null?"":org.get("creditCode").toString();
126
-        }
127
 
122
 
128
         Date date = new Date();
123
         Date date = new Date();
129
         // JSON字符串转对象
124
         // JSON字符串转对象
130
         ObjectMapper mapper = new ObjectMapper();
125
         ObjectMapper mapper = new ObjectMapper();
131
 
126
 
132
-        BizSqrEnterpriseApply bizSqrEnterpriseApply = (BizSqrEnterpriseApply) mapper.readValue(bizSqrEnterpriseApplyJson, BizSqrEnterpriseApply.class);
133
         String unitInfoId =bizSqrEnterpriseApply.getUnitInfoId();
127
         String unitInfoId =bizSqrEnterpriseApply.getUnitInfoId();
134
         BizSqrEnterprise bizSqrEnterprise=bizSqrEnterpriseMapper.fibdByEnterprise(unitInfoId);
128
         BizSqrEnterprise bizSqrEnterprise=bizSqrEnterpriseMapper.fibdByEnterprise(unitInfoId);
135
 
129
 
136
        // BizSqrEnterpriseApply bSqrEnterpriseApply = bizSqrEnterpriseApplyService.findById(bizSqrEnterpriseApplyId);
130
        // BizSqrEnterpriseApply bSqrEnterpriseApply = bizSqrEnterpriseApplyService.findById(bizSqrEnterpriseApplyId);
137
-        if(bizSqrEnterpriseApply.getApplyStatus()==0){//保存
131
+        if(bizSqrEnterpriseApply.getApplyStatus()==0){
138
             if(bizSqrEnterpriseApply.getApplyType()==4){
132
             if(bizSqrEnterpriseApply.getApplyType()==4){
139
                 if(bizSqrEnterpriseApply.getId()!=null){
133
                 if(bizSqrEnterpriseApply.getId()!=null){
140
                     bizSqrEnterpriseApplyMapper.delete(bizSqrEnterpriseApply.getId());
134
                     bizSqrEnterpriseApplyMapper.delete(bizSqrEnterpriseApply.getId());