Commit c3a147f6 by java-李谡

部门论证添加备注节点

parent 8ed37a7e
...@@ -39,6 +39,7 @@ import com.github.pagehelper.PageHelper; ...@@ -39,6 +39,7 @@ import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import freemarker.template.TemplateException; import freemarker.template.TemplateException;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.log4j.Logger;
import org.apache.poi.openxml4j.exceptions.InvalidFormatException; import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -63,6 +64,8 @@ import java.util.regex.Pattern; ...@@ -63,6 +64,8 @@ import java.util.regex.Pattern;
*/ */
@Service @Service
public class SailingCommandService extends CurdService<SailingCommandDao, SailingCommandEntity> { public class SailingCommandService extends CurdService<SailingCommandDao, SailingCommandEntity> {
private final static Logger LOG = Logger.getLogger(SailingCommandService.class);
@Autowired @Autowired
private AirlineVerifyDao verifyDao; private AirlineVerifyDao verifyDao;
@Autowired @Autowired
...@@ -370,11 +373,7 @@ public class SailingCommandService extends CurdService<SailingCommandDao, Sailin ...@@ -370,11 +373,7 @@ public class SailingCommandService extends CurdService<SailingCommandDao, Sailin
if ("01".equals(CommandStatus) && "01".equals(bean.getCommandStatus())) { if ("01".equals(CommandStatus) && "01".equals(bean.getCommandStatus())) {
return false; return false;
} }
if ("01".equals(bean.getCommandStatus()) || "02".equals(bean.getCommandStatus())) {
//commandStatus为’01’时,以verifId找到foc_airline_verify对应数据中的verif_status设置为02
bean.setVerifStatus("02");
dao.updateVerifStatys(bean);
}
if (!"00".equals(bean.getCommandStatus())) { if (!"00".equals(bean.getCommandStatus())) {
// 该input标签不一定以 / 结尾 // 该input标签不一定以 / 结尾
Pattern pattern = Pattern.compile("(?<=routeNo\" value=\")(.+?)(?=\"/?>)"); Pattern pattern = Pattern.compile("(?<=routeNo\" value=\")(.+?)(?=\"/?>)");
...@@ -394,7 +393,6 @@ public class SailingCommandService extends CurdService<SailingCommandDao, Sailin ...@@ -394,7 +393,6 @@ public class SailingCommandService extends CurdService<SailingCommandDao, Sailin
bean.setRouteNo(routeNo); bean.setRouteNo(routeNo);
// if(bean.getFormText()!=null&&!"".equals(bean.getFormText())){ // if(bean.getFormText()!=null&&!"".equals(bean.getFormText())){
try {
// 完成审核通知置灰 // 完成审核通知置灰
NotifyAddBean addbean = new NotifyAddBean(); NotifyAddBean addbean = new NotifyAddBean();
addbean.setVerifId(bean.getVerifId()); addbean.setVerifId(bean.getVerifId());
...@@ -540,7 +538,7 @@ public class SailingCommandService extends CurdService<SailingCommandDao, Sailin ...@@ -540,7 +538,7 @@ public class SailingCommandService extends CurdService<SailingCommandDao, Sailin
sb.append(bean.getConRemarks().replaceAll("<table", "<table width=\"80%\" ")); sb.append(bean.getConRemarks().replaceAll("<table", "<table width=\"80%\" "));
// sb.append(bean.getConRemarks()); // sb.append(bean.getConRemarks());
/* sb.append("<br/><h2>开航指令:</h2>"); /* sb.append("<br/><h2>开航指令:</h2>");
sb.append(bean.getFormText());*/ sb.append(bean.getFormText());*/
sb.append("<br/><h2>各部门论证单:</h2>"); sb.append("<br/><h2>各部门论证单:</h2>");
...@@ -595,42 +593,46 @@ public class SailingCommandService extends CurdService<SailingCommandDao, Sailin ...@@ -595,42 +593,46 @@ public class SailingCommandService extends CurdService<SailingCommandDao, Sailin
sailingFileBean.setCreateBy(bean.getUserCode()); sailingFileBean.setCreateBy(bean.getUserCode());
//dao.deleteSailingFile(sailingFileBean); //dao.deleteSailingFile(sailingFileBean);
dao.insertSailingFile(sailingFileBean); dao.insertSailingFile(sailingFileBean);
} catch (Exception e) { LOG.info("添加开航指令文件完成");
// TODO: handle exception
}
dao.updateAirlineverify(bean); dao.updateAirlineverify(bean);
LOG.info("更新开航指令绑定完成");
// 获取论证全部参与部门 // 获取论证全部参与部门
List<String> lst = dao.getVerifDeparts(bean.getVerifId()); List<String> lst = dao.getVerifDeparts(bean.getVerifId());
for (String departId : lst) { for (String departId : lst) {
NotifyAddBean addbean = new NotifyAddBean(); NotifyAddBean addbean1 = new NotifyAddBean();
StringBuffer sb = new StringBuffer(); StringBuffer sbContent = new StringBuffer();
sb.append("论证单号为").append(map1.get("verifNo")) sbContent.append("论证单号为").append(map1.get("verifNo"))
.append(map1.get("verifType")).append(map1.get("depName")).append("的航线已生成开航指令。"); .append(map1.get("verifType")).append(map1.get("depName")).append("的航线已生成开航指令。");
StringBuffer url = new StringBuffer(); StringBuffer url = new StringBuffer();
url.append("<<<a href='airway-argument-details.htm?verifId=").append(bean.getVerifId()); url.append("<<<a href='airway-argument-details.htm?verifId=").append(bean.getVerifId());
url.append("&verifNo=").append(map1.get("verifNo")); url.append("&verifNo=").append(map1.get("verifNo"));
url.append("&sailingDate=").append(map1.get("startTime")); url.append("&sailingDate=").append(map1.get("startTime"));
url.append("'>点击查看</a>"); url.append("'>点击查看</a>");
addbean.setUrl(url.toString()); addbean1.setUrl(url.toString());
addbean.setType("14"); addbean1.setType("14");
addbean.setContent(sb.toString()); addbean1.setContent(sbContent.toString());
addbean.setTitle("开航指令下发完成提醒"); addbean1.setTitle("开航指令下发完成提醒");
addbean.setCreateBy(bean.getUserCode()); addbean1.setCreateBy(bean.getUserCode());
addbean.setUpdateBy(bean.getUserCode()); addbean1.setUpdateBy(bean.getUserCode());
addbean.setCreateDate(new Date()); addbean1.setCreateDate(new Date());
addbean.setUpdateDate(new Date()); addbean1.setUpdateDate(new Date());
addbean.setId(IdWorker.getNextId()); addbean1.setId(IdWorker.getNextId());
addbean.setDepartId(departId); addbean1.setDepartId(departId);
addbean.setVerifId(bean.getVerifId()); addbean1.setVerifId(bean.getVerifId());
addbean.setConId(bean.getVerifId()); addbean1.setConId(bean.getVerifId());
notifyDao.saveNotify(addbean); notifyDao.saveNotify(addbean1);
} }
} }
dao.updateSailingCommand(bean); dao.updateSailingCommand(bean);
LOG.info("更新开航指令状态完成,已完成开航指令,开航指令状态:" + bean.getCommandStatus());
if ("01".equals(bean.getCommandStatus()) || "02".equals(bean.getCommandStatus())) {
//commandStatus为’01’时,以verifId找到foc_airline_verify对应数据中的verif_status设置为02
bean.setVerifStatus("02");
dao.updateVerifStatys(bean);
LOG.info("更新论证状态为论证成功");
}
return true; return true;
} }
......
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