|
@@ -78,12 +78,15 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
// in.setAssistAidName(getAssistAidName(in.getAssistAid()));
|
|
// in.setAssistAidName(getAssistAidName(in.getAssistAid()));
|
|
|
in.setMainName(my.getName());
|
|
in.setMainName(my.getName());
|
|
|
}
|
|
}
|
|
|
- Map checkOrderNo = checkOrderNoDuration(in);
|
|
|
|
|
- boolean isValid = (boolean) checkOrderNo.get("code");
|
|
|
|
|
- if (isValid){
|
|
|
|
|
- in.setTechStartProcess(0);
|
|
|
|
|
- }else {
|
|
|
|
|
- in.setTechStartProcess(1);
|
|
|
|
|
|
|
+ Map checkOrderNo =null;
|
|
|
|
|
+ if (in.getType() == 1) {
|
|
|
|
|
+ checkOrderNo = checkOrderNoDuration(in);
|
|
|
|
|
+ boolean isValid = (boolean) checkOrderNo.get("code");
|
|
|
|
|
+ if (isValid){
|
|
|
|
|
+ in.setTechStartProcess(0);
|
|
|
|
|
+ }else {
|
|
|
|
|
+ in.setTechStartProcess(1);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
publicReleaseMapper.insertSelective(in);
|
|
publicReleaseMapper.insertSelective(in);
|
|
|
List<PublicReleaseDetails> prdList=new ArrayList<>();
|
|
List<PublicReleaseDetails> prdList=new ArrayList<>();
|
|
@@ -348,9 +351,19 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
|
throw new BusinessException("转换异常");
|
|
throw new BusinessException("转换异常");
|
|
|
}
|
|
}
|
|
|
|
|
+ Map checkOrderNo =null;
|
|
|
|
|
+ if (in.getType() == 1) {
|
|
|
|
|
+ checkOrderNo = checkOrderNoDuration(in);
|
|
|
|
|
+ boolean isValid = (boolean) checkOrderNo.get("code");
|
|
|
|
|
+ if (isValid){
|
|
|
|
|
+ in.setTechStartProcess(0);
|
|
|
|
|
+ }else {
|
|
|
|
|
+ in.setTechStartProcess(1);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
List<User> uses=null;
|
|
List<User> uses=null;
|
|
|
PublicRelease use = publicReleaseMapper.selectByPrimaryKey(in.getId());
|
|
PublicRelease use = publicReleaseMapper.selectByPrimaryKey(in.getId());
|
|
|
-
|
|
|
|
|
|
|
+ in.setCreateTime(use.getCreateTime());
|
|
|
String userNames=publicReleaseDetailsMapper.getNamesByPrid(in.getId());
|
|
String userNames=publicReleaseDetailsMapper.getNamesByPrid(in.getId());
|
|
|
PublicReleaseLog log=new PublicReleaseLog(in.getId(),TokenManager.getAdminId(),null,in.getReason(),date);
|
|
PublicReleaseLog log=new PublicReleaseLog(in.getId(),TokenManager.getAdminId(),null,in.getReason(),date);
|
|
|
in.setUserNames(userNames);
|
|
in.setUserNames(userNames);
|
|
@@ -377,18 +390,6 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
publicExamineMapper.updateByPridSelective(pe);
|
|
publicExamineMapper.updateByPridSelective(pe);
|
|
|
}
|
|
}
|
|
|
AdminListBo my = adminMapper.getDeptNameByAid(TokenManager.getAdminId());
|
|
AdminListBo my = adminMapper.getDeptNameByAid(TokenManager.getAdminId());
|
|
|
- Map checkOrderNo=new HashMap();
|
|
|
|
|
- if (in.getType()==1){
|
|
|
|
|
- checkOrderNo = checkOrderNoDuration(in);
|
|
|
|
|
- boolean isValid = (boolean) checkOrderNo.get("code");
|
|
|
|
|
- if (isValid){
|
|
|
|
|
- in.setTechStartProcess(0);
|
|
|
|
|
- }else {
|
|
|
|
|
- in.setTechStartProcess(1);
|
|
|
|
|
- }
|
|
|
|
|
- }else {
|
|
|
|
|
- in.setTechStartProcess(0);
|
|
|
|
|
- }
|
|
|
|
|
//重新发起
|
|
//重新发起
|
|
|
addPublicReleaseLog(my,in,in.getUserNames(),date,uses,checkOrderNo);
|
|
addPublicReleaseLog(my,in,in.getUserNames(),date,uses,checkOrderNo);
|
|
|
}else {
|
|
}else {
|
|
@@ -607,6 +608,10 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
if (use.getStatus()!=1) {
|
|
if (use.getStatus()!=1) {
|
|
|
throw new BusinessException("只能修改发起的状态公出");
|
|
throw new BusinessException("只能修改发起的状态公出");
|
|
|
}
|
|
}
|
|
|
|
|
+ if(examineType==0||examineType==1){
|
|
|
|
|
+ if(use.getTechStartProcess()!=0) throw new BusinessException("技术公出先需营销审核。");
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
//当前审核人员
|
|
//当前审核人员
|
|
|
Admin ad=adminMapper.selectByPrimaryKey(aid);
|
|
Admin ad=adminMapper.selectByPrimaryKey(aid);
|
|
|
//公出负责人
|
|
//公出负责人
|
|
@@ -689,6 +694,45 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
p.setRejectName(ad.getName());
|
|
p.setRejectName(ad.getName());
|
|
|
addpublicLog(id, 0, str.toString());
|
|
addpublicLog(id, 0, str.toString());
|
|
|
}
|
|
}
|
|
|
|
|
+ }else if (examineType==2){
|
|
|
|
|
+ //通知公出人切换成公出人审核人
|
|
|
|
|
+ a=adminMapper.selectByPrimaryKey(a.getReviewer());
|
|
|
|
|
+ if (status==2){//审核通过
|
|
|
|
|
+ str=str.append("同意公出我的企业,").append(remarks);
|
|
|
|
|
+ content=content.append("已通过审核,请尽快审核。");
|
|
|
|
|
+ List<PublicExamine> publicExamines = publicExamineMapper.selectByPrid(use.getId());
|
|
|
|
|
+ int x=0;
|
|
|
|
|
+ for (PublicExamine pe : publicExamines) {
|
|
|
|
|
+ if (pe.getAid().equals(aid)){
|
|
|
|
|
+ pe.setStatus(1);
|
|
|
|
|
+ PublicExamine newp=new PublicExamine();
|
|
|
|
|
+ newp.setId(pe.getId());
|
|
|
|
|
+ newp.setStatus(1);
|
|
|
|
|
+ publicExamineMapper.updateByPrimaryKeySelective(newp);
|
|
|
|
|
+ x++;
|
|
|
|
|
+ }else {
|
|
|
|
|
+ if (pe.getStatus()==1){
|
|
|
|
|
+ x++;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ if (x==publicExamines.size()){
|
|
|
|
|
+ p.setPublicType(2);
|
|
|
|
|
+ flag=true;
|
|
|
|
|
+ }
|
|
|
|
|
+ addpublicLog(id, status, str.toString());
|
|
|
|
|
+
|
|
|
|
|
+ }else if (status==0){//审核驳回
|
|
|
|
|
+ //切换通知人公出负责人
|
|
|
|
|
+ a=publicAdmin;
|
|
|
|
|
+ str=str.append("不同意公出我的企业,").append(remarks);;
|
|
|
|
|
+ content=content.append("未通过审核,请修改后重新发起。");
|
|
|
|
|
+ p.setPublicType(3);
|
|
|
|
|
+ p.setStatus(0);
|
|
|
|
|
+ p.setAuditInfo(str.toString());
|
|
|
|
|
+ p.setRejectName(ad.getName());
|
|
|
|
|
+ addpublicLog(id, 0, str.toString());
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
AdminListBo my = adminMapper.getDeptNameByAid(TokenManager.getAdminId());
|
|
AdminListBo my = adminMapper.getDeptNameByAid(TokenManager.getAdminId());
|
|
|
if (flag){
|
|
if (flag){
|
|
@@ -1602,7 +1646,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
map.put("code",false);
|
|
map.put("code",false);
|
|
|
map.put("data",data);
|
|
map.put("data",data);
|
|
|
}
|
|
}
|
|
|
- } else if (t.getTotalAmount().compareTo(BigDecimal.valueOf(10))>0) {
|
|
|
|
|
|
|
+ } else if (t.getTotalAmount().compareTo(BigDecimal.valueOf(10))>=0) {
|
|
|
data.setAmountType(4);
|
|
data.setAmountType(4);
|
|
|
map.put("code",true);
|
|
map.put("code",true);
|
|
|
map.put("data",null);
|
|
map.put("data",null);
|