标准清单入库 bug修复

This commit is contained in:
yuezhihang
2021-07-06 20:14:34 +08:00
parent b4c0465f18
commit 9f856079ee
6 changed files with 18 additions and 9 deletions
@@ -13,8 +13,8 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
@FeignClient(value = "bat-wkflow")
//@FeignClient(value = "shan")
//@FeignClient(value = "bat-wkflow")
@FeignClient(value = "shan")
public interface workFlowFeignClient {
@RequestMapping(value = "/bat-wkflow/activiti_define_start_user",method = RequestMethod.GET)
@@ -213,7 +213,7 @@ public class WorkFlowController {
@ApiOperation(value = "完成任务")
@PostMapping("/completeTask")
public Wrapper<String> completeTaskByUserId(@RequestBody BusMes busMes){
public Wrapper<String> completeTaskByUserId( BusMes busMes){
Wrapper<String> str = workFlowFeignClient.completeTaskByUserId(busMes);
if(str.getCode() == 500){
str.setSuccess(false);
@@ -5,6 +5,7 @@ import com.adc.da.slrs.sarLawsAttrDetailedList.entity.LittleLawsDto;
import com.adc.da.slrs.sarLawsAttrDetailedList.entity.StandExcelDto;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@@ -20,10 +21,10 @@ import java.util.List;
public interface SarLawsAttrDetailedListDao extends BaseMapper<SarLawsAttrDetailedList> {
//根据清单id,查出标准的id并排序
List<String> selectLawsId(String standId,Integer page,Integer size);
List<String> selectLawsId(@Param("standId") String standId,@Param("param3") Integer page,@Param("param2") Integer size);
//根据标准id查出数据
List<LittleLawsDto> selectLawsById(List<String> LawsIds,String standName);
List<LittleLawsDto> selectLawsById(@Param("param1") List<String> LawsIds,@Param("standName") String standName);
List<String> selectLawsId2(String standId);
Boolean insertList(List<SarLawsAttrDetailedList> sarLawsAttrDetailedLists);
Boolean insertList(@Param("sarLawsAttrDetailedLists") List<SarLawsAttrDetailedList> sarLawsAttrDetailedLists);
Boolean deleteByStandId(String standId);
}
@@ -1,6 +1,7 @@
package com.adc.da.slrs.sarLawsAttrDetailedList.entity;
import com.adc.da.base.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@@ -27,16 +28,19 @@ public class SarLawsAttrDetailedList extends BaseEntity {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "主键")
@TableId
@TableField(value = "id")
private String id;
@ApiModelProperty(value = "标准政策表的id")
@TableField(value = "stand_id")
private String standId;
@ApiModelProperty(value = "标准清单主键")
@TableField(value = "detailed_list_id")
private String detailedListId;
@ApiModelProperty(value = "顺序")
@TableField(value = "number")
private String number;
@@ -83,6 +83,7 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
break;
}
sarLawsDetailedListDao.insert(sarLawsDetailedList);
addDetailedDto.setInforlist(addDetailedDto.getInforlist().substring(1,addDetailedDto.getInforlist().length()-1));
String[] split = addDetailedDto.getInforlist().split(",");
service.insertDetailedList(sarLawsDetailedList.getId(),split);
@@ -189,6 +190,7 @@ public class SarLawsDetailedListServiceImpl extends ServiceImpl<SarLawsDetailedL
else list.setDetailedListState(detailedUpDto.getDetailedListState());
sarLawsDetailedListDao.updateById(list);
detailedUpDto.setInforlist(detailedUpDto.getInforlist().substring(1,detailedUpDto.getInforlist().length()-1));
String[] split = detailedUpDto.getInforlist().split(",");
service.updateDetailedLaws(detailedUpDto.getId(), split);
return "修改成功";
@@ -33,7 +33,7 @@
</if>
</where>
order by number
LIMIT #{param3} OFFSET #{param2};
LIMIT #{param3} , #{param2};
</select>
<select id="selectLawsId2" resultType="string">
@@ -45,12 +45,14 @@
</where>
order by number
</select>
<insert id="insertList">
INSERT INTO sar_laws_attr_detailed_list ( id, number, detailed_list_id, stand_id ) VALUES
<foreach collection ="list" item="list" separator =",">
<foreach collection ="sarLawsAttrDetailedLists" item="list" separator =",">
(#{list.id,jdbcType=VARCHAR}, #{list.number}, #{list.detailedListId,jdbcType=VARCHAR}, #{list.standId,jdbcType=VARCHAR})
</foreach >
</insert>
<delete id="deleteByStandId">
delete from sar_laws_attr_detailed_list where detailed_list_id=#{standId,jdbcType=VARCHAR}
</delete>