Browse Source

去掉财务信息和单位的绑定

liujing-123 2 weeks ago
parent
commit
eb9d96927f

+ 6 - 11
delivery-module-core/delivery-module-core-biz/src/main/java/com/unis/module/coding/service/cwxx/CwxxServiceImpl.java

@@ -20,8 +20,10 @@ import com.unis.module.coding.dal.mysql.cwxxyear.CwxxYearMapper;
20
 import com.unis.module.coding.dal.mysql.kqxx.KqxxMapper;
20
 import com.unis.module.coding.dal.mysql.kqxx.KqxxMapper;
21
 import org.springframework.stereotype.Service;
21
 import org.springframework.stereotype.Service;
22
 import org.springframework.validation.annotation.Validated;
22
 import org.springframework.validation.annotation.Validated;
23
+
23
 import javax.annotation.Resource;
24
 import javax.annotation.Resource;
24
 import java.util.List;
25
 import java.util.List;
26
+
25
 import static com.unis.framework.common.exception.util.ServiceExceptionUtil.exception;
27
 import static com.unis.framework.common.exception.util.ServiceExceptionUtil.exception;
26
 import static com.unis.module.core.enums.ErrorCodeConstants.CWXX_NOT_EXISTS;
28
 import static com.unis.module.core.enums.ErrorCodeConstants.CWXX_NOT_EXISTS;
27
 import static com.unis.module.infra.enums.ErrorCodeConstants.ERROR;
29
 import static com.unis.module.infra.enums.ErrorCodeConstants.ERROR;
@@ -46,17 +48,10 @@ public class CwxxServiceImpl implements CwxxService {
46
     public Long createCwxx(CwxxSaveReqVO createReqVO) {
48
     public Long createCwxx(CwxxSaveReqVO createReqVO) {
47
         //财务信息根据单位绑定,有就修改,没有就添加
49
         //财务信息根据单位绑定,有就修改,没有就添加
48
         CwxxDO cwxx = BeanUtils.toBean(createReqVO, CwxxDO.class);
50
         CwxxDO cwxx = BeanUtils.toBean(createReqVO, CwxxDO.class);
49
-        List<CwxxDO> dept_id = cwxxMapper.selectList(new QueryWrapper<CwxxDO>().eq("DEPT_ID", createReqVO.getDeptId()));
50
-        if (CollectionUtils.isEmpty(dept_id)) {
51
-            // 插入
52
-            cwxx.setId(YitIdHelper.nextId());
53
-            cwxxMapper.insert(cwxx);
54
-        } else {
55
-            //更改
56
-            cwxx.setId(dept_id.get(0).getId());
57
-            cwxxMapper.updateById(cwxx);
58
-        }
59
-
51
+//        List<CwxxDO> dept_id = cwxxMapper.selectList(new QueryWrapper<CwxxDO>().eq("DEPT_ID", createReqVO.getDeptId()));
52
+        // 插入
53
+        cwxx.setId(YitIdHelper.nextId());
54
+        cwxxMapper.insert(cwxx);
60
         // 返回
55
         // 返回
61
         return cwxx.getId();
56
         return cwxx.getId();
62
     }
57
     }