Commit 7c57389d authored by 何龙龙's avatar 何龙龙

服务分配模块第二次提交

parent 67029526
package com.hungraim.ltc.pojo.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import lombok.experimental.FieldDefaults;
import java.io.Serializable;
@Data
public class PageInfo implements Serializable {
@TableField(exist = false)
private int current;
@TableField(exist = false)
private int limit;
}
......@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hungraim.ltc.pojo.entity.PageInfo;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
......@@ -17,7 +18,7 @@ import java.util.Date;
@Data
@TableName("CH_DISABLE_APPLY")
@KeySequence(value = "SEQ_CH_DISABLE_APPLY")
public class ChDisableApply implements Serializable {
public class ChDisableApply extends PageInfo implements Serializable {
/**
* 失能申请id
......
package com.hungraim.ltc.pojo.entity.disable;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hungraim.ltc.pojo.entity.PageInfo;
import lombok.Data;
......@@ -12,6 +13,7 @@ import java.io.Serializable;
@Data
@TableName("CH_SRV_ORGAN")
public class ChSrvOrgan extends PageInfo implements Serializable {
@TableId("srv_organ_id")
private Integer srvOrganId;
private String acptRoadDetail;
private String acptLongitude;
......
......@@ -34,6 +34,7 @@ public class BuildBedController {
private ApplyService applyService;
@Resource
private CrvService crvService;
@Resource
private DisableEvaluateService disableEvaluateService;
......@@ -190,25 +191,28 @@ public class BuildBedController {
*提交分配机构
*/
@PostMapping("/submit")
public Result submit(@RequestBody(required = false)ChSrvOrgan chSrvOrgan){
public Result submit(@RequestBody(required = false) ChDisableApply chDisableApply){
// 判斷參數是否存在
if (chSrvOrgan.getPermitId()==null){
return Result.failed("失能人员id無效");
if (chDisableApply.getApplyId()==null){
return Result.failed("机构id無效");
}
// 查出失能人員相關信息
ChSrvOrgan apply = crvService.selectById(chSrvOrgan.getPermitId());
apply.setOrganId(chSrvOrgan.getOrganId());
apply.setDistrictProvincial(chSrvOrgan.getDistrictProvincial());
apply.setDistrictCity(chSrvOrgan.getDistrictCity());
apply.setDistrictArea(chSrvOrgan.getDistrictArea());
apply.setSrvOrganName(chSrvOrgan.getSrvOrganName());
apply.setOrganTypeId(chSrvOrgan.getOrganTypeId());
apply.setUnifiedSocialCreditCode(chSrvOrgan.getUnifiedSocialCreditCode());
apply.setSrvType(chSrvOrgan.getSrvType());
apply.setEndTime(chSrvOrgan.getEndTime());
apply.setAcptRoadDetail(chSrvOrgan.getAcptRoadDetail());
apply.setAcptRoadType(chSrvOrgan.getAcptRoadType());
crvService.updateById(apply);
ChDisableApply apply = applyService.selectById(chDisableApply.getApplyId());
ChSrvOrgan chSrvOrgan = new ChSrvOrgan();
apply.setOrganId(chDisableApply.getOrganId());
apply.setDistrictProvincial(chDisableApply.getDistrictProvincial());
apply.setDistrictCity(chDisableApply.getDistrictCity());
apply.setDistrictArea(chDisableApply.getDistrictArea());
apply.setSrvModeId(chDisableApply.getSrvModeId());
// apply.setSrvOrganName(chDisableApply.getSrvOrganName());
// apply.setOrganTypeId(chSrvOrgan.getOrganTypeId());
// apply.setUnifiedSocialCreditCode(chSrvOrgan.getUnifiedSocialCreditCode());
// apply.setSrvType(chSrvOrgan.getSrvType());
apply.setEndTime(chDisableApply.getEndTime());
apply.setAcptRoadDetail(chDisableApply.getAcptRoadDetail());
// apply.setAcptRoadType(chSrvOrgan.getAcptRoadType());
// crvService.updateById(apply);
applyService.updateById(apply);
return Result.success(apply);
}
......
......@@ -11,6 +11,6 @@ public interface CrvService extends IService<ChSrvOrgan> {
Page<ChSrvOrgan> seletPage(Page<ChSrvOrgan> chSrvOrganPage, QueryWrapper<ChSrvOrgan> queryWrapper);
ChSrvOrgan selectById(String permitId);
ChSrvOrgan selectById(long applyId);
}
......@@ -24,7 +24,10 @@ public class CrvServiceImpl extends ServiceImpl<CrvMapper, ChSrvOrgan> implement
}
@Override
public ChSrvOrgan selectById(String permitId) {
return crvMapper.selectById(permitId);
public ChSrvOrgan selectById(long applyId) {
return crvMapper.selectById(applyId);
}
}
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