Commit 3a5ade4b authored by 蔡镇泽's avatar 蔡镇泽

新增评定机构或更新评定机构信息修改传参方式

parent cad0f4b6
...@@ -5,7 +5,6 @@ import com.hungraim.ltc.governance.service.AprOrganService; ...@@ -5,7 +5,6 @@ import com.hungraim.ltc.governance.service.AprOrganService;
import com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach; import com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach;
import com.hungraim.ltc.pojo.entity.assessment.ChAprEmp; import com.hungraim.ltc.pojo.entity.assessment.ChAprEmp;
import com.hungraim.ltc.pojo.entity.assessment.ChCfgAprGroupDetail; import com.hungraim.ltc.pojo.entity.assessment.ChCfgAprGroupDetail;
import com.hungraim.ltc.pojo.entity.serviceManage.ChAprOrgan;
import com.hungraim.ltc.pojo.entity.serviceManage.ChCfgAprOrganType; import com.hungraim.ltc.pojo.entity.serviceManage.ChCfgAprOrganType;
import com.hungraim.ltc.pojo.entity.serviceManage.ChCfgAprempType; import com.hungraim.ltc.pojo.entity.serviceManage.ChCfgAprempType;
import com.hungraim.ltc.pojo.entity.serviceManage.ChFndEducation; import com.hungraim.ltc.pojo.entity.serviceManage.ChFndEducation;
...@@ -84,19 +83,14 @@ public class AprOrganController { ...@@ -84,19 +83,14 @@ public class AprOrganController {
/** /**
* 新增评定机构或更新评定机构信息(有apr_organ_id就更新,没有就新增) * 新增评定机构或更新评定机构信息(有apr_organ_id就更新,没有就新增)
*
* @param accountInfo 账号信息附件
* @param organBusinessLicense 机构营业执照附件
* @param healthcareProviderAgreement 定点医护机构协议附件
* @param otherFile 其他附件
*/ */
@PostMapping("/addOrUpdateAprOrgan") @PostMapping("/addOrUpdateAprOrgan")
public Result addOrUpdateAprOrgan(ChAprOrgan chAprOrgan, ChFndAttach accountInfo, ChFndAttach organBusinessLicense, ChFndAttach healthcareProviderAgreement, ChFndAttach otherFile) { public Result addOrUpdateAprOrgan(AprOrganInfoVO chAprOrgan) {
if (chAprOrgan == null) { if (chAprOrgan == null) {
return Result.failed(ResultCode.REQUEST_PARAM_ERROR); return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
} }
if (accountInfo == null || organBusinessLicense == null || healthcareProviderAgreement == null) { if (chAprOrgan.getFileDataList().size() < 3) {
return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
} }
if (chAprOrgan.getAprOrganId() == null) { if (chAprOrgan.getAprOrganId() == null) {
//新增 //新增
...@@ -181,7 +175,7 @@ public class AprOrganController { ...@@ -181,7 +175,7 @@ public class AprOrganController {
return Result.failed(ResultCode.REQUEST_PARAM_ERROR); return Result.failed(ResultCode.REQUEST_PARAM_ERROR);
} }
} }
aprOrganService.addOrUpdateAprOrgan(chAprOrgan, accountInfo, organBusinessLicense, healthcareProviderAgreement, otherFile); aprOrganService.addOrUpdateAprOrgan(chAprOrgan);
return Result.success(); return Result.success();
} }
......
...@@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; ...@@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach; import com.hungraim.ltc.pojo.entity.SysConfig.ChFndAttach;
import com.hungraim.ltc.pojo.entity.assessment.ChAprEmp; import com.hungraim.ltc.pojo.entity.assessment.ChAprEmp;
import com.hungraim.ltc.pojo.entity.assessment.ChCfgAprGroupDetail; import com.hungraim.ltc.pojo.entity.assessment.ChCfgAprGroupDetail;
import com.hungraim.ltc.pojo.entity.serviceManage.ChAprOrgan;
import com.hungraim.ltc.pojo.entity.serviceManage.ChCfgAprOrganType; import com.hungraim.ltc.pojo.entity.serviceManage.ChCfgAprOrganType;
import com.hungraim.ltc.pojo.entity.serviceManage.ChCfgAprempType; import com.hungraim.ltc.pojo.entity.serviceManage.ChCfgAprempType;
import com.hungraim.ltc.pojo.entity.serviceManage.ChFndEducation; import com.hungraim.ltc.pojo.entity.serviceManage.ChFndEducation;
...@@ -27,7 +26,7 @@ public interface AprOrganService { ...@@ -27,7 +26,7 @@ public interface AprOrganService {
void updateAprOrganStatus(String aprOrganId, Short status); void updateAprOrganStatus(String aprOrganId, Short status);
void addOrUpdateAprOrgan(ChAprOrgan chAprOrgan, ChFndAttach accountInfo, ChFndAttach organBusinessLicense, ChFndAttach healthcareProviderAgreement, ChFndAttach otherFile); void addOrUpdateAprOrgan(AprOrganInfoVO chAprOrgan);
AprOrganInfoVO getAprOrganInfo(Long aprOrganId); AprOrganInfoVO getAprOrganInfo(Long aprOrganId);
......
...@@ -27,7 +27,6 @@ import org.springframework.beans.BeanUtils; ...@@ -27,7 +27,6 @@ import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
...@@ -68,7 +67,7 @@ public class AprOrganServiceImpl implements AprOrganService { ...@@ -68,7 +67,7 @@ public class AprOrganServiceImpl implements AprOrganService {
} }
@Override @Override
public void addOrUpdateAprOrgan(ChAprOrgan chAprOrgan, ChFndAttach accountInfo, ChFndAttach organBusinessLicense, ChFndAttach healthcareProviderAgreement, ChFndAttach otherFile) { public void addOrUpdateAprOrgan(AprOrganInfoVO chAprOrgan) {
if (chAprOrgan.getAprOrganId() == null) { if (chAprOrgan.getAprOrganId() == null) {
//新增 //新增
chAprOrgan.setEffTime(new Date()); chAprOrgan.setEffTime(new Date());
...@@ -100,14 +99,7 @@ public class AprOrganServiceImpl implements AprOrganService { ...@@ -100,14 +99,7 @@ public class AprOrganServiceImpl implements AprOrganService {
aprOrganMapper.updateById(aprOrgan); aprOrganMapper.updateById(aprOrgan);
chAprOrgan.setAprOrganId(aprOrgan.getAprOrganId()); chAprOrgan.setAprOrganId(aprOrgan.getAprOrganId());
} }
List<ChFndAttach> fileDataList = new ArrayList<>(); updateAttachs(chAprOrgan.getFileDataList(), chAprOrgan.getAprOrganId(), AttachType.APR_ORGAN.getUploadType());
fileDataList.add(accountInfo);
fileDataList.add(organBusinessLicense);
fileDataList.add(healthcareProviderAgreement);
if (otherFile != null) {
fileDataList.add(otherFile);
}
updateAttachs(fileDataList, chAprOrgan.getAprOrganId(), AttachType.APR_ORGAN.getUploadType());
} }
@Override @Override
......
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