Commit 0af120e4 authored by 李松's avatar 李松

修改bug

parent a1752f0f
......@@ -132,5 +132,8 @@ public class JgChangeVehicleRegistrationUnitDto extends BaseDto {
@ApiModelProperty(value = "车牌号")
private String carNumber;
@ApiModelProperty(value = "转办人")
private String transferToUserIds;
private List<String> roleIds;
}
......@@ -239,4 +239,10 @@ public class JgChangeVehicleRegistrationUnit extends BaseEntity {
@TableField("car_number")
private String carNumber;
/**
* 转办
*/
@TableField("transfer_to_user_ids")
private String transferToUserIds;
}
......@@ -19,7 +19,7 @@ public interface JgChangeVehicleRegistrationUnitMapper extends BaseMapper<JgChan
List<Map<String, Object>> getEquList(@Param("records") List<String>records);
Page<JgChangeVehicleRegistrationUnit> getPage(@Param("page")Page<JgChangeVehicleRegistrationUnit>page,
Page<Map<String, Object>> getPage(@Param("page")Page<JgChangeVehicleRegistrationUnit>page,
@Param("dto")JgChangeVehicleRegistrationUnitDto dto,
@Param("type") String type,
@Param("orgCode") String orgCode,
......
......@@ -38,27 +38,27 @@
</select>
<select id="getPage"
resultType="com.yeejoin.amos.boot.module.jg.api.entity.JgChangeVehicleRegistrationUnit">
resultType="java.util.Map">
select
cru.sequence_nbr,
cru.change_type,
cru.apply_no,
cru.sequence_nbr as sequenceNbr,
cru.change_type as changeType,
cru.apply_no as applyNo,
date_format(cru.apply_date,'%Y-%m-%d') as applyDate,
date_format(cru.audit_pass_date,'%Y-%m-%d') as auditPassDate,
cru.receive_org_name,
cru.receive_org_code,
cru.use_unit_name,
cru.new_use_unit_name,
cru.transfer_to_user_ids,
cru.car_number,
cru.next_execute_user_ids,
cru.next_task_id,
cru.use_regist_code,
cru.receive_org_name as receiveOrgName,
cru.receive_org_code as receiveOrgCode,
cru.use_unit_name as useUnitName,
cru.new_use_unit_name as newUseUnitName,
cru.transfer_to_user_ids as transferToUserIds,
cru.car_number as carNumber,
cru.next_execute_user_ids as nextExecuteUserIds,
cru.next_task_id as nextTaskId,
cru.use_regist_code as useRegistCode,
cru.status,
cru.instance_status,
cru.instance_status as instanceStatus,
cru.promoter,
cru.next_executor_ids,
cru.instance_id
cru.next_executor_ids as nextExecutorIds,
cru.instance_id as instanceId
from tzs_jg_change_vehicle_registration_unit cru
<where>
<if test="dto.applyNo != null and dto.applyNo != ''">
......
......@@ -213,10 +213,10 @@ public class JgChangeVehicleRegistrationUnitServiceImpl extends BaseService<JgCh
return Collections.singletonList(dto);
}
public Page<JgChangeVehicleRegistrationUnit> getPage(Page<JgChangeVehicleRegistrationUnit> page, JgChangeVehicleRegistrationUnitDto dto, String type, ReginParams reginParams){
public Page<Map<String, Object>> getPage(Page<JgChangeVehicleRegistrationUnit> page, JgChangeVehicleRegistrationUnitDto dto, String type, ReginParams reginParams) {
String orgCode = reginParams.getCompany().getCompanyCode();
String currentUserId = reginParams.getUserModel().getUserId();
return this.getBaseMapper().getPage(page, dto, type, orgCode, currentUserId, dto.getRoleIds());
return this.getBaseMapper().getPage(page, dto, type, orgCode, currentUserId, dto.getRoleIds());
}
@Transactional(rollbackFor = Exception.class)
......@@ -353,7 +353,7 @@ public class JgChangeVehicleRegistrationUnitServiceImpl extends BaseService<JgCh
return jgChangeVehicleRegistrationUnit;
}
public void saveRecord(JgChangeVehicleRegistrationUnit jgChangeVehicleRegistrationUnit, TaskV2Model taskV2Model){
public void saveRecord(JgChangeVehicleRegistrationUnit jgChangeVehicleRegistrationUnit, TaskV2Model taskV2Model) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
JgUseRegistrationManage manage = jgUseRegistrationManageService.lambdaQuery().eq(JgUseRegistrationManage::getUseRegistrationCode, jgChangeVehicleRegistrationUnit.getUseRegistCode()).one();
// 业务流水生成
......@@ -383,19 +383,19 @@ public class JgChangeVehicleRegistrationUnitServiceImpl extends BaseService<JgCh
// 保存证流水信息
jgCertificateChangeRecordService.save(jgCertificateChangeRecord);
// 组装设备流水
dataList.forEach(item ->{
dataList.forEach(item -> {
JSONObject object = JSONObject.parseObject(JSON.toJSONString(item));
JgCertificateChangeRecordEq jgCertificateChangeRecordEq = new JgCertificateChangeRecordEq();
jgCertificateChangeRecordEq.setEquId(object.get("record").toString());
jgCertificateChangeRecordEq.setChangeRecordId(jgCertificateChangeRecord.getSequenceNbr().toString());
jgCertificateChangeRecordEq.setProductCode(object.get("factoryNum").toString());
jgCertificateChangeRecordEqs.add(jgCertificateChangeRecordEq);
jgCertificateChangeRecordEq.setEquId(object.get("record").toString());
jgCertificateChangeRecordEq.setChangeRecordId(jgCertificateChangeRecord.getSequenceNbr().toString());
jgCertificateChangeRecordEq.setProductCode(object.get("factoryNum").toString());
jgCertificateChangeRecordEqs.add(jgCertificateChangeRecordEq);
});
// 保存设备流水信息
jgCertificateChangeRecordEqService.saveBatch(jgCertificateChangeRecordEqs);
List<String> collect = jgCertificateChangeRecordEqs.stream().map(JgCertificateChangeRecordEq::getEquId).collect(Collectors.toList());
if ("0".equals(jgChangeVehicleRegistrationUnit.getChangeType()) && !ObjectUtils.isEmpty(collect)){
if ("0".equals(jgChangeVehicleRegistrationUnit.getChangeType()) && !ObjectUtils.isEmpty(collect)) {
// 区外变更
// 生成使用登记证编号
String receiveCompanyCode = jgChangeVehicleRegistrationUnit.getReceiveCompanyCode();
......@@ -415,7 +415,7 @@ public class JgChangeVehicleRegistrationUnitServiceImpl extends BaseService<JgCh
registerInfo.setUseOrgCode(code);
idxBizJgRegisterInfoService.update(registerInfo, lambda);
// 使用登记证下设备更新监管码
collect.forEach(a ->{
collect.forEach(a -> {
createCode(jgChangeVehicleRegistrationUnit, manage.getEquDefineCode(), a);
});
}
......@@ -619,6 +619,7 @@ public class JgChangeVehicleRegistrationUnitServiceImpl extends BaseService<JgCh
.eq(JgRegistrationHistory::getCurrentDocumentId, sequenceNbr));
return Boolean.TRUE;
}
public Map<String, Object> getDetails(String sequenceNbr) {
JgRegistrationHistory history = jgRegistrationHistoryService.lambdaQuery().eq(JgRegistrationHistory::getCurrentDocumentId, sequenceNbr).eq(JgRegistrationHistory::getRegistrationClass, BUSINESS_NAME).one();
if (!ObjectUtils.isEmpty(history) && !ObjectUtils.isEmpty(history.getChangeData())) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment