|
|
@@ -246,7 +246,7 @@ public class ApiController {
|
|
|
if (StringUtil.isEmpty(exist.getDeptId())) {
|
|
|
dept.setDeptId((long) 0);
|
|
|
jdbcClient.jdbcInsert(dept, connection);
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
dept.setDeptId(exist.getDeptId());
|
|
|
jdbcClient.jdbcUpdateById(dept, connection);
|
|
|
}
|
|
|
@@ -307,7 +307,7 @@ public class ApiController {
|
|
|
|
|
|
SysUser exist = new SysUser();
|
|
|
exist.setUsername(model.getC_USER_CODE());
|
|
|
- exist = jdbcClient.getJdbcModel(exist,connection);
|
|
|
+ exist = jdbcClient.getJdbcModel(exist, connection);
|
|
|
if (StringUtil.isEmpty(exist.getUserId())) {
|
|
|
user.setUserId((long) 0);
|
|
|
jdbcClient.jdbcInsert(user, connection);
|
|
|
@@ -345,7 +345,7 @@ public class ApiController {
|
|
|
Supplier exist = new Supplier();
|
|
|
exist.setCreditCode(model.getC_UNISOCIALCREDIT_CODE());
|
|
|
exist = jdbcClient.getJdbcModel(exist, connection);
|
|
|
- if (StringUtil.isEmpty(exist.getId())) {
|
|
|
+ if (StringUtil.isNotEmpty(exist.getId()) && !exist.getSupplierNo().equals(model.getC_EXTERNAL_UNIT_CODE())) {
|
|
|
exist.setSupplierNo(model.getC_EXTERNAL_UNIT_CODE());
|
|
|
jdbcClient.jdbcUpdateById(exist, connection);
|
|
|
}
|