Commit 54912e16e1be396c9eadbc87a35d2172e8a00031
Merge remote-tracking branch 'origin/master_0929' into master_0929
Showing
3 changed files
with
48 additions
and
4 deletions
| ... | ... | @@ -12,7 +12,9 @@ import com.lframework.starter.web.core.components.resp.PageResult; |
| 12 | 12 | import com.lframework.starter.common.utils.StringUtil; |
| 13 | 13 | import java.io.Serializable; |
| 14 | 14 | import com.lframework.starter.common.utils.Assert; |
| 15 | +import com.lframework.starter.web.inner.entity.SysDataDicItem; | |
| 15 | 16 | import com.lframework.starter.web.inner.entity.SysUser; |
| 17 | +import com.lframework.starter.web.inner.service.system.SysDataDicItemService; | |
| 16 | 18 | import com.lframework.starter.web.inner.service.system.SysUserService; |
| 17 | 19 | import com.lframework.xingyun.basedata.entity.Customer; |
| 18 | 20 | import com.lframework.xingyun.basedata.service.customer.CustomerService; |
| ... | ... | @@ -43,6 +45,8 @@ public class CustomerCreditHistoryServiceImpl extends BaseMpServiceImpl<Customer |
| 43 | 45 | private CustomerService customerService; |
| 44 | 46 | @Resource |
| 45 | 47 | private SysUserService sysUserService; |
| 48 | + @Resource | |
| 49 | + private SysDataDicItemService sysDataDicItemService; | |
| 46 | 50 | // 定义不需要比较的字段 |
| 47 | 51 | private static final Set<String> EXCLUDED_FIELDS = new HashSet<>(Arrays.asList( |
| 48 | 52 | "id", "sort", "createById", "createBy", "updateById", |
| ... | ... | @@ -307,6 +311,27 @@ public class CustomerCreditHistoryServiceImpl extends BaseMpServiceImpl<Customer |
| 307 | 311 | value2 = customer2.getName(); |
| 308 | 312 | } |
| 309 | 313 | } |
| 314 | + //区域 | |
| 315 | + if ("region".equals(fieldName)) { | |
| 316 | + if (StringUtil.isNotEmpty(data.getRegion())) { | |
| 317 | + List<SysDataDicItem> sysDataDicItemList = sysDataDicItemService.findByDicCode("CREDIT_ZONE"); | |
| 318 | + | |
| 319 | + value1 = sysDataDicItemList.stream() | |
| 320 | + .filter(item -> data.getRegion() != null && data.getRegion().equals(item.getCode())) | |
| 321 | + .map(SysDataDicItem::getName) | |
| 322 | + .findFirst() | |
| 323 | + .orElse(data.getRegion()); | |
| 324 | + } | |
| 325 | + if (StringUtil.isNotEmpty(customerCreditHistory.getRegion())) { | |
| 326 | + List<SysDataDicItem> sysDataDicItemList = sysDataDicItemService.findByDicCode("CREDIT_ZONE"); | |
| 327 | + | |
| 328 | + value2 = sysDataDicItemList.stream() | |
| 329 | + .filter(item -> customerCreditHistory.getRegion() != null && customerCreditHistory.getRegion().equals(item.getCode())) | |
| 330 | + .map(SysDataDicItem::getName) | |
| 331 | + .findFirst() | |
| 332 | + .orElse(customerCreditHistory.getRegion()); | |
| 333 | + } | |
| 334 | + } | |
| 310 | 335 | //企业类型 |
| 311 | 336 | if ("enterpriseType".equals(fieldName)) { |
| 312 | 337 | if (StringUtil.isNotEmpty(data.getEnterpriseType())) { | ... | ... |
| ... | ... | @@ -15,8 +15,10 @@ import com.lframework.starter.web.core.components.redis.RedisHandler; |
| 15 | 15 | import com.lframework.starter.web.core.components.security.SecurityUtil; |
| 16 | 16 | import com.lframework.starter.web.core.utils.*; |
| 17 | 17 | import com.lframework.starter.web.inner.bo.system.user.GetSysUserBo; |
| 18 | +import com.lframework.starter.web.inner.entity.SysDataDicItem; | |
| 18 | 19 | import com.lframework.starter.web.inner.entity.SysDept; |
| 19 | 20 | import com.lframework.starter.web.inner.entity.SysUser; |
| 21 | +import com.lframework.starter.web.inner.service.system.SysDataDicItemService; | |
| 20 | 22 | import com.lframework.starter.web.inner.service.system.SysDeptService; |
| 21 | 23 | import com.lframework.starter.web.inner.service.system.SysUserDeptService; |
| 22 | 24 | import com.lframework.starter.web.inner.service.system.SysUserService; |
| ... | ... | @@ -97,6 +99,8 @@ public class CustomerCreditServiceImpl extends BaseMpServiceImpl<CustomerCreditM |
| 97 | 99 | private String exportTemplate; |
| 98 | 100 | @Resource |
| 99 | 101 | private TransactorHandler transactorHandler; |
| 102 | + @Resource | |
| 103 | + private SysDataDicItemService sysDataDicItemService; | |
| 100 | 104 | |
| 101 | 105 | @Override |
| 102 | 106 | public PageResult<CustomerCredit> query(Integer pageIndex, Integer pageSize, QueryCustomerCreditVo vo) { |
| ... | ... | @@ -1383,6 +1387,17 @@ public class CustomerCreditServiceImpl extends BaseMpServiceImpl<CustomerCreditM |
| 1383 | 1387 | } |
| 1384 | 1388 | } |
| 1385 | 1389 | } |
| 1390 | + //区域 | |
| 1391 | + if (StringUtil.isNotEmpty(data.getRegion())) { | |
| 1392 | + List<SysDataDicItem> sysDataDicItemList = sysDataDicItemService.findByDicCode("CREDIT_ZONE"); | |
| 1393 | + | |
| 1394 | + String regionName = sysDataDicItemList.stream() | |
| 1395 | + .filter(item -> data.getRegion() != null && data.getRegion().equals(item.getCode())) | |
| 1396 | + .map(SysDataDicItem::getName) | |
| 1397 | + .findFirst() | |
| 1398 | + .orElse(data.getRegion()); | |
| 1399 | + data.setRegion(regionName); | |
| 1400 | + } | |
| 1386 | 1401 | if (StringUtil.isNotEmpty(data.getEnterpriseType())) { |
| 1387 | 1402 | String enterpriseType; |
| 1388 | 1403 | if ("DEALER".equals(data.getEnterpriseType())) { | ... | ... |
| ... | ... | @@ -155,7 +155,9 @@ public class DraftRequestCarTicketServiceImpl extends BaseMpServiceImpl<DraftReq |
| 155 | 155 | if (!StringUtil.isBlank(vo.getStatus())) { |
| 156 | 156 | data.setStatus(vo.getStatus()); |
| 157 | 157 | } else { |
| 158 | - data.setStatus("AUDIT"); | |
| 158 | + if (!"SHIPMENTSPLAN".equals(vo.getSource())) { | |
| 159 | + data.setStatus("AUDIT"); | |
| 160 | + } | |
| 159 | 161 | } |
| 160 | 162 | if (!StringUtil.isBlank(vo.getSource())) { |
| 161 | 163 | data.setSource(vo.getSource()); |
| ... | ... | @@ -165,9 +167,11 @@ public class DraftRequestCarTicketServiceImpl extends BaseMpServiceImpl<DraftReq |
| 165 | 167 | |
| 166 | 168 | OpLogUtil.setVariable("id", data.getId()); |
| 167 | 169 | OpLogUtil.setExtra(vo); |
| 168 | - //开启审核 | |
| 169 | - data.setUpdateById(SecurityUtil.getCurrentUser().getId()); | |
| 170 | - flowInstanceWrapperService.startInstance(BPM_FLAG, data.getId(), BPM_FLAG, data); | |
| 170 | + if (!"SHIPMENTSPLAN".equals(vo.getSource())) { | |
| 171 | + //开启审核 | |
| 172 | + data.setUpdateById(SecurityUtil.getCurrentUser().getId()); | |
| 173 | + flowInstanceWrapperService.startInstance(BPM_FLAG, data.getId(), BPM_FLAG, data); | |
| 174 | + } | |
| 171 | 175 | |
| 172 | 176 | return data.getId(); |
| 173 | 177 | } | ... | ... |