|
@@ -70,24 +70,26 @@ public class DcsbWebService extends BaseWebCtl {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- public DcsbEntity findOne(String id) {
|
|
|
+ public DcsbEntity findOne(String id, boolean flag) {
|
|
|
DcsbEntity dcsb = dcsbService.findOne(id);
|
|
|
- if (dcsb != null) {
|
|
|
- MtEntity mt = mtService.findOne(dcsb.getMt());
|
|
|
- if (mt != null) {
|
|
|
- dcsb.setMt(mt.getMtmc());
|
|
|
- }
|
|
|
- BwEntity bw = bwService.findOne(dcsb.getBw());
|
|
|
- if (bw != null) {
|
|
|
- dcsb.setBw(bw.getBwmc());
|
|
|
- }
|
|
|
- CodeEntity jcg = securityMgr.codeService().findOne(dcsb.getJcg());
|
|
|
- if (jcg != null) {
|
|
|
- dcsb.setJcg(jcg.getText());
|
|
|
- }
|
|
|
- CodeEntity mwn = securityMgr.codeService().findOne(dcsb.getNwm());
|
|
|
- if (mwn != null) {
|
|
|
- dcsb.setNwm(mwn.getText());
|
|
|
+ if (flag) {
|
|
|
+ if (dcsb != null) {
|
|
|
+ MtEntity mt = mtService.findOne(dcsb.getMt());
|
|
|
+ if (mt != null) {
|
|
|
+ dcsb.setMt(mt.getMtmc());
|
|
|
+ }
|
|
|
+ BwEntity bw = bwService.findOne(dcsb.getBw());
|
|
|
+ if (bw != null) {
|
|
|
+ dcsb.setBw(bw.getBwmc());
|
|
|
+ }
|
|
|
+ CodeEntity jcg = securityMgr.codeService().findOne(dcsb.getJcg());
|
|
|
+ if (jcg != null) {
|
|
|
+ dcsb.setJcg(jcg.getText());
|
|
|
+ }
|
|
|
+ CodeEntity mwn = securityMgr.codeService().findOne(dcsb.getNwm());
|
|
|
+ if (mwn != null) {
|
|
|
+ dcsb.setNwm(mwn.getText());
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
return dcsb;
|
|
@@ -182,6 +184,7 @@ public class DcsbWebService extends BaseWebCtl {
|
|
|
entity.setSzgk(jyr.getSzgk());
|
|
|
entity.setSzgq(jyr.getSzgq());
|
|
|
entity.setSzd(jyr.getSzd());
|
|
|
+ entity.setShzt("2402");
|
|
|
}
|
|
|
try {
|
|
|
entity = dcsbService.submit(entity);
|
|
@@ -192,8 +195,8 @@ public class DcsbWebService extends BaseWebCtl {
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
- public boolean audit(String shyj, String dcsbId, boolean flag) {
|
|
|
- UserEntity userEntity = getWebServiceUser();
|
|
|
+ public boolean audit(String shyj, String dcsbId, boolean flag, String userId) {
|
|
|
+ UserEntity userEntity = securityMgr.userService().findById(userId);
|
|
|
if (userEntity == null) {
|
|
|
return false;
|
|
|
}
|
|
@@ -298,15 +301,26 @@ public class DcsbWebService extends BaseWebCtl {
|
|
|
/**
|
|
|
* 根据用户主键查询经营人信息
|
|
|
*
|
|
|
- * @param jyrId
|
|
|
+ * @param userId
|
|
|
* @return
|
|
|
*/
|
|
|
- public GkjyrEntity findJyr(String jyrId) {
|
|
|
- UserEntity ue = securityMgr.userService().findById(jyrId);
|
|
|
+ public GkjyrEntity findJyr(String userId) {
|
|
|
+ UserEntity ue = securityMgr.userService().findById(userId);
|
|
|
if (ue != null && ue.getSsjyr() != null) {
|
|
|
return ue.getSsjyr();
|
|
|
}
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 根据用户主键查询用户信息
|
|
|
+ *
|
|
|
+ * @param userId
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public UserEntity findUser(String userId) {
|
|
|
+ UserEntity ue = securityMgr.userService().findById(userId);
|
|
|
+ return ue;
|
|
|
+ }
|
|
|
+
|
|
|
}
|