Commit 3e8de69d authored by chenzhao's avatar chenzhao

Merge remote-tracking branch 'origin/developer' into developer

parents 254eba39 7c2ea3bb
......@@ -88,4 +88,10 @@ public class PowerStationDto extends BaseDto {
@ApiModelProperty(value = "契约锁合同id")
private String contractLockId;
@ApiModelProperty(value = "盖章状态")
private String stampStatus;
@ApiModelProperty(value = "合同状态")
private String status;
}
......@@ -10,8 +10,10 @@
hygf_peasant_household.regional_companies_name,
hygf_peasant_household.developer_code,
hygf_peasant_household.developer_user_id,
hygf_peasant_household.project_address_detail
from hygf_power_station LEFT JOIN ( select peasant_household_id,initiate_status, contract_lock_id from hygf_household_contract where hygf_household_contract.status !='已作废'
hygf_peasant_household.project_address_detail,
b.stamp_status,
b.status
from hygf_power_station LEFT JOIN ( select peasant_household_id,initiate_status, contract_lock_id,stamp_status,status from hygf_household_contract where hygf_household_contract.status !='已作废'
) b on b.peasant_household_id=hygf_power_station.peasant_household_id
LEFT JOIN hygf_peasant_household on hygf_peasant_household.sequence_nbr=hygf_power_station.peasant_household_id
where hygf_power_station.is_delete=0
......
......@@ -163,7 +163,10 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
powerStation.setRecDate(new Date());
Boolean fl = this.saveOrUpdate(powerStation);
//Boolean fl = this.saveOrUpdate(powerStation);
// 避免生成多份数据
Boolean fl = this.saveOrUpdate(powerStation,new LambdaQueryWrapper<PowerStation>()
.eq(PowerStation::getPeasantHouseholdId,powerStation.getPeasantHouseholdId()));
PowerStationNodeEnum powerStationNodeEnum = PowerStationNodeEnum
.getNodeByCode(powerStation.getNextProcessNode());
......
......@@ -215,6 +215,7 @@ public class QiyuesuoServiceImpl {
List<Stamper> stampers = new ArrayList<>();
stampers.add(stamper);
stampers.add(stamper2);
//发起合同
SdkResponse<Object> data = this.getSdkResponse(result.getId(), stampers);
return result.getId();
}
......
......@@ -909,26 +909,55 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
//区域公司
LambdaQueryWrapper<RegionalCompanies> qu=new LambdaQueryWrapper<>();
qu.eq(RegionalCompanies::getUnitId,unitInfo.getAmosCompanySeq());
List<RegionalCompanies> oldList = regionalCompaniesMapper.selectList(qu);
regionalCompaniesMapper.delete(qu);
List<String> oldDisString = oldList.stream().map((regionalCompanies) -> regionalCompanies.getRegionalCompaniesSeq().toString()).collect(Collectors.toList());
List<String> newDisString = dis.stream().map((regionalCompaniesSeq) -> regionalCompaniesSeq.toString()).collect(Collectors.toList());
for(String item:oldDisString){
if(!newDisString.contains(item)){
throw new BadRequest("所属区域公司只能增加, 不能删除");
}
}
List<RegionalCompanies> regionalComp= new ArrayList<>();
FeignClientResult<Collection<CompanyModel>> feignClientResult= Privilege.companyClient.querySubAgencyTree(regionalCompanies);
List<CompanyModel> companyModel = (List<CompanyModel>)feignClientResult.getResult();
List<String> lisd=unitInfo.getRegionalCompaniesSeq();
if(oldList==null) {
oldList = new ArrayList<>();
}
if(companyModel!=null&&!companyModel.isEmpty()&&lisd!=null&&!lisd.isEmpty()){
for (Object aLong : lisd) {
RegionalCompanies oldRe = oldList.stream().filter(s -> Objects.equals(s.getRegionalCompaniesSeq().toString(), aLong.toString())).findFirst().orElse(null);
if(oldRe!= null) {
lisk.add(oldRe.getRegionalCompaniesCode());
regionalComp.add(oldRe);
}else {
for (CompanyModel compan : companyModel) {
if(compan.getSequenceNbr().longValue()==Long.valueOf(aLong.toString()).longValue()){
RegionalCompanies re= new RegionalCompanies(Long.valueOf(aLong.toString()), compan.getCompanyName(), compan.getOrgCode(), unitInfo.getAmosCompanySeq(),unitInfo.getSequenceNbr());
lisk.add(compan.getOrgCode());
regionalComp.add(re);
continue;
}
}
}
}
}
regionalCompaniesService.saveBatch(regionalComp);
//修改管理员权限
......
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