|
|
@@ -150,15 +150,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
pad.setContent(in.getAssistContent());
|
|
|
publicAssistDetailsMapper.insert(pad);
|
|
|
if (in.getAssistType().contains(",")){
|
|
|
- String[] split = in.getAssistType().split(",");
|
|
|
- List<PublicReleaseType> list =new ArrayList<>();
|
|
|
- for (String s : split) {
|
|
|
- PublicReleaseType pt=new PublicReleaseType();
|
|
|
- pt.setPrid(in.getId());
|
|
|
- pt.setType(s);
|
|
|
- list.add(pt);
|
|
|
- }
|
|
|
- publicReleaseTypeMapper.insertBatch(list);
|
|
|
+ addPublicReleaseType(in.getId(),in.getAssistType());
|
|
|
}
|
|
|
}
|
|
|
if (in.getType()==1&&in.getOrderNo()!=null){
|
|
|
@@ -188,6 +180,18 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
return (Map<String, Object>) addPublicReleaseLog(my, in,userNames,date,users,checkOrderNo);
|
|
|
}
|
|
|
|
|
|
+ private void addPublicReleaseType(Integer id,String type) {
|
|
|
+ String[] split = type.split(",");
|
|
|
+ List<PublicReleaseType> list =new ArrayList<>();
|
|
|
+ for (String s : split) {
|
|
|
+ PublicReleaseType pt=new PublicReleaseType();
|
|
|
+ pt.setPrid(id);
|
|
|
+ pt.setType(s);
|
|
|
+ list.add(pt);
|
|
|
+ }
|
|
|
+ publicReleaseTypeMapper.insertBatch(list);
|
|
|
+ }
|
|
|
+
|
|
|
private void pushPublicAssistCarbonCopy(InputPublicRelease in, AdminListBo my, String userNames) {
|
|
|
String[] split = in.getAssistAid().split(",");
|
|
|
for (String aid2 : split) {
|
|
|
@@ -648,6 +652,13 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
throw new BusinessException("该公出已签到,无法取消");
|
|
|
}
|
|
|
}
|
|
|
+ PublicAssistDetails usePd = publicAssistDetailsMapper.selectByPrid(in.getId());
|
|
|
+ if (!in.getAssistType().equals(usePd.getType())){
|
|
|
+ publicReleaseTypeMapper.deleteByPrid(in.getId());
|
|
|
+ if (in.getAssistType().contains(",")){
|
|
|
+ addPublicReleaseType(in.getId(),in.getAssistType());
|
|
|
+ }
|
|
|
+ }
|
|
|
}else if (in.getAssist()==0){
|
|
|
publicReleaseMapper.updateAssist(in);
|
|
|
in.setAssistProcess(0);
|