Commit 49ae5269 by Your Name Committed by chenzg

更新部门下不能新增岗位员工

parent efa47952
...@@ -10,6 +10,7 @@ import java.util.Set; ...@@ -10,6 +10,7 @@ import java.util.Set;
import cn.timer.api.bean.spmk.*; import cn.timer.api.bean.spmk.*;
import cn.timer.api.dao.spmk.*; import cn.timer.api.dao.spmk.*;
import cn.timer.api.dto.spmk.*; import cn.timer.api.dto.spmk.*;
import net.sf.json.JSONArray;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
...@@ -599,7 +600,7 @@ public class SpmkController { ...@@ -599,7 +600,7 @@ public class SpmkController {
adm.setRequestData(spmkApproveSummaryDto.getRequestData().toString()); adm.setRequestData(spmkApproveSummaryDto.getRequestData().toString());
adm.setFroms(spmkApproveSummaryDto.getFroms().toString()); adm.setFroms(spmkApproveSummaryDto.getFroms().toString());
adm.setRouter(listRouter.get(0).toJSONString()); adm.setRouter(listRouter.get(0).toJSONString());
adm.setFlowChildren(listFlowChildren.toString()); adm.setFlowChildren(JSONArray.fromObject(listFlowChildren).toString());
try { try {
spmkApproveDetailSummaryMapper.insert(adm); spmkApproveDetailSummaryMapper.insert(adm);
}catch (Exception e){ }catch (Exception e){
......
package cn.timer.api.controller.spmk.service; package cn.timer.api.controller.spmk.service;
import java.lang.reflect.Type;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
...@@ -12,7 +13,7 @@ import cn.timer.api.dao.spmk.*; ...@@ -12,7 +13,7 @@ import cn.timer.api.dao.spmk.*;
import cn.timer.api.dto.spmk.FlowChildren; import cn.timer.api.dto.spmk.FlowChildren;
import cn.timer.api.dto.spmk.Router; import cn.timer.api.dto.spmk.Router;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import net.sf.json.JSONArray;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -116,10 +117,7 @@ public class SpmkServiceImpl implements SpmkService{ ...@@ -116,10 +117,7 @@ public class SpmkServiceImpl implements SpmkService{
adD.setRouter(jsonObject.parseObject(ad.getRouter(), Router.class)); adD.setRouter(jsonObject.parseObject(ad.getRouter(), Router.class));
} }
if(ad.getFlowChildren()!=null) { if(ad.getFlowChildren()!=null) {
adD.setFlowChildren(jsonObject.parseArray(ad.getFroms(), FlowChildren.class)); adD.setFlowChildren(jsonObject.parseArray(ad.getFlowChildren(), FlowChildren.class));
/*List<String> strsToList1= Arrays.asList(ad.getFlowChildren().split("FlowChildren"));
System.out.println(strsToList1);*/
} }
adD.setApproveExecuteRecord(listAer); adD.setApproveExecuteRecord(listAer);
if(sum != null) { if(sum != null) {
......
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