修改代码;
This commit is contained in:
parent
31f7740e7c
commit
c21c7373b5
@ -32,10 +32,10 @@ public class ResidentServiceApplyController extends BaseController {
|
||||
@Resource
|
||||
private IResidentServiceAppletService residentServiceAppletService;
|
||||
|
||||
@ApiOperation("提交服务申请(批量)")
|
||||
@ApiOperation("提交服务申请")
|
||||
@PostMapping("/save")
|
||||
public R<?> save(@RequestBody ResidentServiceApplyBody body) {
|
||||
if (body == null || body.getFormList() == null || body.getFormList().size() == 0) {
|
||||
if (body == null || StringUtils.isBlank(body.getPackageNo()) || StringUtils.isBlank(body.getFormNo())) {
|
||||
return R.fail("请求参数不能为空");
|
||||
}
|
||||
residentServiceAppletService.insert(body);
|
||||
|
||||
@ -17,7 +17,7 @@ import java.util.List;
|
||||
**/
|
||||
@Data
|
||||
@ApiModel("居民服务申请请求对象")
|
||||
public class ResidentServiceApplyBody {
|
||||
public class ResidentServiceApplyBody extends ResidentServiceFormApplyDto{
|
||||
|
||||
/**
|
||||
* 居民编号
|
||||
@ -94,6 +94,7 @@ public class ResidentServiceApplyBody {
|
||||
/**
|
||||
* 服务项集合
|
||||
*/
|
||||
@ApiModelProperty(value = "服务项集合", hidden = true)
|
||||
List<ResidentServiceFormApplyDto> formList;
|
||||
|
||||
}
|
||||
|
||||
@ -77,9 +77,6 @@ public class ResidentServiceApplyServiceImpl implements IResidentServiceAppletSe
|
||||
}
|
||||
}
|
||||
|
||||
List<ResidentServiceApplyEntity> serviceApplyList = new ArrayList<>();
|
||||
for (ResidentServiceFormApplyDto form : body.getFormList()) {
|
||||
if (!StringUtils.isBlank(form.getFormNo())) {
|
||||
entity = new ResidentServiceApplyEntity();
|
||||
BeanUtils.copyProperties(body, entity);
|
||||
if (patientInfo != null) {
|
||||
@ -91,17 +88,7 @@ public class ResidentServiceApplyServiceImpl implements IResidentServiceAppletSe
|
||||
// 审批状态0:待批准 1:已同意 2:已拒绝
|
||||
entity.setApprovalStatus("0");
|
||||
entity.setBookingNo(IdUtils.simpleUUID());
|
||||
entity.setPackageNo(form.getPackageNo());
|
||||
entity.setPackageName(form.getPackageName());
|
||||
entity.setFormNo(form.getFormNo());
|
||||
entity.setFormName(form.getFormName());
|
||||
serviceApplyList.add(entity);
|
||||
}
|
||||
}
|
||||
if (serviceApplyList.size() == 0) {
|
||||
throw new ServiceException("服务项目不能为空");
|
||||
}
|
||||
residentServiceApplyMapper.batchInsert(serviceApplyList);
|
||||
residentServiceApplyMapper.insert(entity);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -78,6 +78,9 @@ public class ResidentSignApplyServiceImpl implements IResidentSignAppletService
|
||||
// 审批状态0:待批准 1:已同意 2:已拒绝
|
||||
entity.setApprovalStatus("0");
|
||||
entity.setBookingNo(IdUtils.simpleUUID());
|
||||
if(StringUtils.isBlank(entity.getNation())) {
|
||||
entity.setNation("1");
|
||||
}
|
||||
residentSignApplyMapper.insert(entity);
|
||||
}
|
||||
|
||||
|
||||
@ -127,8 +127,12 @@ public class ScreeningRecordServiceImpl implements IScreeningRecordService {
|
||||
recordBody.setScreeningStatus("1");
|
||||
recordBody.setApplyCode(generateCode());
|
||||
recordBody.setScreeningType("1");
|
||||
try {
|
||||
// 预约条码
|
||||
recordBody.setApplyBarcode(generateBarcode(xinELuConfig.getApplyBarcodePitureUrl(), recordBody.getScreeningId(), recordBody.getApplyCode()));
|
||||
} catch (Exception e) {
|
||||
|
||||
}
|
||||
int flag = screeningRecordMapper.insert(recordBody);
|
||||
if(flag > 0) {
|
||||
// 推送消息
|
||||
|
||||
Loading…
Reference in New Issue
Block a user