|
@@ -43,14 +43,13 @@ public class XmxxglServiceImpl extends BaseWorkFlowServiceImpl<XmxxglEntity, Str
|
|
|
private WorkflowMangerService workService;
|
|
|
@Autowired
|
|
|
protected SecurityMgr securityMgr;
|
|
|
-
|
|
|
+
|
|
|
@Override
|
|
|
protected SecRepository<XmxxglEntity, String> getDao() {
|
|
|
|
|
|
return this.dao;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
@Override
|
|
|
public <S extends XmxxglEntity> S submit(S entity) {
|
|
|
if (entity.getRecordStatus() == BaseEntity.RECORD_STATE_REJECT) {
|
|
@@ -68,39 +67,41 @@ public class XmxxglServiceImpl extends BaseWorkFlowServiceImpl<XmxxglEntity, Str
|
|
|
} else {
|
|
|
entity.setRecordStatus(BaseEntity.RECORD_STATE_SUBMIT);
|
|
|
entity = this.save(entity);
|
|
|
- //把港区id拼到role_sc后面,只有经营人所在港区的审查人员才能看到办理
|
|
|
- String gqid="";
|
|
|
- if(securityMgr.getCurrUser().getSfjyr().getText().equals("是")){
|
|
|
- gqid=entity.getSzgq().getId();
|
|
|
+ // 把港区id拼到role_sc后面,只有经营人所在港区的审查人员才能看到办理
|
|
|
+ String gqid = "";
|
|
|
+ if (securityMgr.getCurrUser().getSfjyr().getText().equals("是")) {
|
|
|
+ gqid = entity.getSzgq().getId();
|
|
|
}
|
|
|
Map<String, Object> variables = new HashMap<String, Object>();
|
|
|
variables.put("role_jyr", Constants.ROLE_Jyr);
|
|
|
- variables.put("role_sc", Constants.ROLE_SC+":"+gqid);
|
|
|
+ variables.put("role_sc", Constants.ROLE_SC + ":" + gqid);
|
|
|
WorkFlowParam param = new WorkFlowParam();
|
|
|
param.put(WorkFlowParam.DESCRIPTION, entity.getXmmc() + "的岸线利用审批");
|
|
|
|
|
|
- /*// 设置流程发起人
|
|
|
- if (StringUtils.isEmpty(param.getString(WorkFlowParam.AUDIT_USER))) {
|
|
|
- param.put(WorkFlowParam.AUDIT_USER, SecUtils.getCurrUser().getId().toString());
|
|
|
- }*/
|
|
|
+ /*
|
|
|
+ * // 设置流程发起人 if
|
|
|
+ * (StringUtils.isEmpty(param.getString(WorkFlowParam.AUDIT_USER)))
|
|
|
+ * { param.put(WorkFlowParam.AUDIT_USER,
|
|
|
+ * SecUtils.getCurrUser().getId().toString()); }
|
|
|
+ */
|
|
|
// 设置流程发起人,设置为当前登录帐号的所属经营人id存到数据库,如果是审查人员,则用当前用户id
|
|
|
- if(securityMgr.getCurrUser().getSfjyr().getText().equals("否")){
|
|
|
+ if (securityMgr.getCurrUser().getSfjyr().getText().equals("否")) {
|
|
|
if (StringUtils.isEmpty(param.getString(WorkFlowParam.AUDIT_USER))) {
|
|
|
param.put(WorkFlowParam.AUDIT_USER, SecUtils.getCurrUser().getId().toString());
|
|
|
}
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
if (StringUtils.isEmpty(param.getString(WorkFlowParam.AUDIT_USER))) {
|
|
|
param.put(WorkFlowParam.AUDIT_USER, SecUtils.getCurrUser().getSsjyr().getId().toString());
|
|
|
- }
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
param.put(WorkFlowParam.BUSINESS_KEY, entity.getId());
|
|
|
// 提交流程
|
|
|
create(param, variables);
|
|
|
}
|
|
|
return entity;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
@Override
|
|
|
public String getProcessDefinitionKey() {
|
|
|
return XmxxglEntity.PROCESS_DEFINITION_KEY;
|
|
@@ -130,7 +131,6 @@ public class XmxxglServiceImpl extends BaseWorkFlowServiceImpl<XmxxglEntity, Str
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
@Override
|
|
|
public void exportExcelAll(List<XmxxglVo> voList, String[] titles, ServletOutputStream outputStream) {
|
|
|
// 创建一个workbook 对应一个excel应用文件
|
|
@@ -177,56 +177,62 @@ public class XmxxglServiceImpl extends BaseWorkFlowServiceImpl<XmxxglEntity, Str
|
|
|
cell = bodyRow.createCell(5);
|
|
|
cell.setCellStyle(bodyStyle);
|
|
|
cell.setCellValue(xmxxgl.getSzgkzw());
|
|
|
-
|
|
|
+
|
|
|
cell = bodyRow.createCell(6);
|
|
|
cell.setCellStyle(bodyStyle);
|
|
|
cell.setCellValue(xmxxgl.getSzgqzw());
|
|
|
-
|
|
|
+
|
|
|
cell = bodyRow.createCell(7);
|
|
|
cell.setCellStyle(bodyStyle);
|
|
|
cell.setCellValue(xmxxgl.getXmfr());
|
|
|
-
|
|
|
+
|
|
|
cell = bodyRow.createCell(8);
|
|
|
cell.setCellStyle(bodyStyle);
|
|
|
cell.setCellValue(xmxxgl.getXmlxzw());
|
|
|
-
|
|
|
+
|
|
|
cell = bodyRow.createCell(9);
|
|
|
cell.setCellStyle(bodyStyle);
|
|
|
cell.setCellValue(xmxxgl.getJsdd());
|
|
|
-
|
|
|
+
|
|
|
cell = bodyRow.createCell(10);
|
|
|
cell.setCellStyle(bodyStyle);
|
|
|
cell.setCellValue(xmxxgl.getJsgm());
|
|
|
-
|
|
|
+
|
|
|
cell = bodyRow.createCell(11);
|
|
|
cell.setCellStyle(bodyStyle);
|
|
|
cell.setCellValue(xmxxgl.getTzlxzw());
|
|
|
-
|
|
|
+
|
|
|
cell = bodyRow.createCell(12);
|
|
|
cell.setCellStyle(bodyStyle);
|
|
|
- if(xmxxgl.getZtz() != null){
|
|
|
+ if (xmxxgl.getZtz() != null) {
|
|
|
cell.setCellValue(xmxxgl.getZtz());
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
cell = bodyRow.createCell(13);
|
|
|
cell.setCellStyle(bodyStyle);
|
|
|
cell.setCellValue(xmxxgl.getXmhzjbzw());
|
|
|
-
|
|
|
+
|
|
|
cell = bodyRow.createCell(14);
|
|
|
cell.setCellStyle(bodyStyle);
|
|
|
cell.setCellValue(xmxxgl.getZftze());
|
|
|
-
|
|
|
+
|
|
|
cell = bodyRow.createCell(15);
|
|
|
cell.setCellStyle(bodyStyle);
|
|
|
- if(xmxxgl.getTzlx().equals("1903")) {
|
|
|
- String ztz = xmxxgl.getZtz().toString();
|
|
|
- String zftze = xmxxgl.getZftze();
|
|
|
- if(isEmpty(ztz) || isEmpty(zftze)) {
|
|
|
+ if ("1903".equals(xmxxgl.getTzlx())) {
|
|
|
+ String ztz = null;
|
|
|
+ if (xmxxgl.getZtz() != null) {
|
|
|
+ ztz = xmxxgl.getZtz().toString();
|
|
|
+ }
|
|
|
+ String zftze = null;
|
|
|
+ if (xmxxgl.getZftze() != null) {
|
|
|
+ zftze = xmxxgl.getZftze();
|
|
|
+ }
|
|
|
+ if (isEmpty(ztz) || isEmpty(zftze)) {
|
|
|
cell.setCellValue("");
|
|
|
break;
|
|
|
}
|
|
|
- if(isFDS(ztz) && isFDS(zftze)) {
|
|
|
- double rate = (Double.parseDouble(zftze)/xmxxgl.getZtz())*100;
|
|
|
+ if (isFDS(ztz) && isFDS(zftze)) {
|
|
|
+ double rate = (Double.parseDouble(zftze) / xmxxgl.getZtz()) * 100;
|
|
|
cell.setCellValue(rate);
|
|
|
}
|
|
|
} else {
|
|
@@ -235,47 +241,47 @@ public class XmxxglServiceImpl extends BaseWorkFlowServiceImpl<XmxxglEntity, Str
|
|
|
cell.setCellStyle(bodyStyle);
|
|
|
cell.setCellValue("");
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
cell = bodyRow.createCell(16);
|
|
|
cell.setCellStyle(bodyStyle);
|
|
|
cell.setCellValue(xmxxgl.getAxspjbzw());
|
|
|
-
|
|
|
+
|
|
|
cell = bodyRow.createCell(17);
|
|
|
cell.setCellStyle(bodyStyle);
|
|
|
- if(xmxxgl.getAxcd() != null){
|
|
|
+ if (xmxxgl.getAxcd() != null) {
|
|
|
cell.setCellValue(xmxxgl.getAxcd());
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
cell = bodyRow.createCell(18);
|
|
|
cell.setCellStyle(bodyStyle);
|
|
|
- if(xmxxgl.getTgnl() != null){
|
|
|
+ if (xmxxgl.getTgnl() != null) {
|
|
|
cell.setCellValue(xmxxgl.getTgnl());
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
cell = bodyRow.createCell(19);
|
|
|
cell.setCellStyle(bodyStyle);
|
|
|
cell.setCellValue(xmxxgl.getBwytzw());
|
|
|
-
|
|
|
+
|
|
|
cell = bodyRow.createCell(20);
|
|
|
cell.setCellStyle(bodyStyle);
|
|
|
cell.setCellValue(xmxxgl.getSylxzw());
|
|
|
-
|
|
|
+
|
|
|
cell = bodyRow.createCell(21);
|
|
|
cell.setCellStyle(bodyStyle);
|
|
|
cell.setCellValue(xmxxgl.getJcsjstr());
|
|
|
-
|
|
|
+
|
|
|
cell = bodyRow.createCell(22);
|
|
|
cell.setCellStyle(bodyStyle);
|
|
|
cell.setCellValue(xmxxgl.getSddx());
|
|
|
-
|
|
|
+
|
|
|
cell = bodyRow.createCell(23);
|
|
|
cell.setCellStyle(bodyStyle);
|
|
|
cell.setCellValue(xmxxgl.getSddy());
|
|
|
-
|
|
|
+
|
|
|
cell = bodyRow.createCell(24);
|
|
|
cell.setCellStyle(bodyStyle);
|
|
|
cell.setCellValue(xmxxgl.getXddx());
|
|
|
-
|
|
|
+
|
|
|
cell = bodyRow.createCell(25);
|
|
|
cell.setCellStyle(bodyStyle);
|
|
|
cell.setCellValue(xmxxgl.getXddy());
|
|
@@ -294,26 +300,26 @@ public class XmxxglServiceImpl extends BaseWorkFlowServiceImpl<XmxxglEntity, Str
|
|
|
e.printStackTrace();
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
- public boolean isFDS(String param){
|
|
|
- if(param == null ){
|
|
|
+ public boolean isFDS(String param) {
|
|
|
+ if (param == null) {
|
|
|
return true;
|
|
|
}
|
|
|
-// String str= "^\\d+(\\.\\d+)?$";
|
|
|
-// Pattern pattern = Pattern.compile(str);
|
|
|
-// Matcher matcher = pattern.matcher(param);
|
|
|
-// boolean flag = matcher.matches();
|
|
|
-// return flag;
|
|
|
- try{
|
|
|
+ // String str= "^\\d+(\\.\\d+)?$";
|
|
|
+ // Pattern pattern = Pattern.compile(str);
|
|
|
+ // Matcher matcher = pattern.matcher(param);
|
|
|
+ // boolean flag = matcher.matches();
|
|
|
+ // return flag;
|
|
|
+ try {
|
|
|
Double.parseDouble(param);
|
|
|
return true;
|
|
|
- }catch(NumberFormatException e){
|
|
|
+ } catch (NumberFormatException e) {
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
public boolean isEmpty(String str) {
|
|
|
if (str != null && str != "" && str.length() != 0) {
|
|
|
return false;
|
|
@@ -327,5 +333,4 @@ public class XmxxglServiceImpl extends BaseWorkFlowServiceImpl<XmxxglEntity, Str
|
|
|
return dao.getXmbm();
|
|
|
}
|
|
|
|
|
|
-
|
|
|
}
|