花城 修改小程序】【单位管理员】单位管理员代表代表重复接单
| | |
| | | @PostMapping("/addNeedTaskData") |
| | | public R addNeedTaskData(@RequestBody NeedProblemUnitTaskDTO item) |
| | | { |
| | | return R.ok(taskService.addData(item)); |
| | | return taskService.addData(item); |
| | | } |
| | | |
| | | @PostMapping("/editNeedTaskData") |
| | |
| | | |
| | | int expurgateData(@Param("id") String id); |
| | | |
| | | Integer isGet(@Param("taskId") String taskId,@Param("unitId") String unitId); |
| | | |
| | | |
| | | |
| | |
| | | |
| | | NeedProblemUnitTaskDTO getDetails(String id); |
| | | |
| | | int addData(NeedProblemUnitTaskDTO item); |
| | | R addData(NeedProblemUnitTaskDTO item); |
| | | |
| | | int editData(NeedProblemUnitTaskDTO item); |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public int addData(NeedProblemUnitTaskDTO item) { |
| | | return baseMapper.addData(item); |
| | | public R addData(NeedProblemUnitTaskDTO item) |
| | | { |
| | | int num=baseMapper.isGet(item.getTaskId(),item.getUnitId()); |
| | | if(num>0) |
| | | { |
| | | return R.fail("该单位已接单"); |
| | | } |
| | | return R.ok(baseMapper.addData(item)); |
| | | } |
| | | |
| | | @Override |
| | |
| | | delete from new_fight_need_problem_unit_task where id=#{id} |
| | | </delete> |
| | | |
| | | |
| | | <select id="isGet" resultType="Integer" > |
| | | select count(id) from new_fight_need_problem_unit_task |
| | | where |
| | | 1=1 |
| | | <if test="taskId != null and taskId != '' "> |
| | | and id=#{taskId} |
| | | </if> |
| | | <if test=" unitId != null and unitId != '' "> |
| | | and unit_id=#{unitId} |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | |
| | | |
| | | </mapper> |
| | | |