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