|
@@ -528,249 +528,159 @@ public class BwCtl extends BaseWebCtl {
|
|
|
wr.setSuccess(false);
|
|
|
wr.setMessage("请选择是否取得港口设施保安证书");
|
|
|
}
|
|
|
+ BwEntity entity = new BwEntity();
|
|
|
try {
|
|
|
if (!StringUtils.isEmpty(code.getId())) {// 修改
|
|
|
- BwEntity entity = bwService.findOne(code.getId());
|
|
|
- entity.setBwcd(code.getBwcd());
|
|
|
- entity.setBwmc(code.getBwmc());
|
|
|
- /* entity.setBwszsx(code.getBwszsx()); */
|
|
|
- if (code.getBwyt() != null && code.getBwyt().startsWith(",")) {
|
|
|
- entity.setBwyt(code.getBwyt().substring(1));
|
|
|
- } else {
|
|
|
- entity.setBwyt(code.getBwyt());
|
|
|
- }
|
|
|
- entity.setHckpnl(code.getHckpnl());
|
|
|
- entity.setJd(code.getJd());
|
|
|
- entity.setJgysnf(code.getJgysnf());
|
|
|
- entity.setJtjgisdyidh(code.getJtjgisdyidh());
|
|
|
- /* entity.setNhwtgnl(code.getNhwtgnl()); */
|
|
|
- entity.setNwxhwttl(code.getNwxhwttl());
|
|
|
- entity.setQysjsh(code.getQysjsh());
|
|
|
- entity.setQysjss(code.getQysjss());
|
|
|
- /* entity.setSclx(code.getSclx()); */
|
|
|
- entity.setSjkpnl(code.getSjkpnl());
|
|
|
- entity.setSjtgnl(code.getSjtgnl());
|
|
|
- entity.setTcnf(code.getTcnf());
|
|
|
- entity.setWd(code.getWd());
|
|
|
- entity.setZyrkfw(code.getZyrkfw());
|
|
|
- entity.setJgxs(code.getJgxs());
|
|
|
- entity.setDtsj(code.getDtsj());
|
|
|
- entity.setBwdm(code.getBwdm());
|
|
|
- /* entity.setSfdwkf(code.getSfdwkf()); */
|
|
|
- /* entity.setNjzxtgnl(code.getNjzxtgnl()); */
|
|
|
- /* entity.setSclx(code.getSclx()); */
|
|
|
- entity.setJgxs(code.getJgxs());
|
|
|
- entity.setHcnlxztj(code.getHcnlxztj());
|
|
|
- entity.setNhwtgnl(code.getNhwtgnl());
|
|
|
- entity.setHwgs(code.getHwgs());
|
|
|
- entity.setHwhc(code.getHwhc());
|
|
|
- entity.setNjzxtgnl(code.getNjzxtgnl());
|
|
|
- entity.setJzxhc(code.getJzxhc());
|
|
|
- entity.setJzxgs(code.getJzxhc());
|
|
|
- entity.setGzsj(code.getGzsj());
|
|
|
- entity.setGzhc(code.getGzhc());
|
|
|
- entity.setGzgs(code.getGzgs());
|
|
|
- entity.setLksj(code.getLksj());
|
|
|
- entity.setLkhc(code.getLkhc());
|
|
|
- entity.setLkgs(code.getLkgs());
|
|
|
- entity.setBwgs(code.getBwgs());
|
|
|
- entity.setBz(code.getBz());
|
|
|
- entity.setZyid(code.getZyid());
|
|
|
- CodeEntity szd = new CodeEntity(szdid);
|
|
|
- entity.setSzd(szd);
|
|
|
-
|
|
|
- GkEntity szgk = new GkEntity();
|
|
|
- szgk.setId(szgkid);
|
|
|
- entity.setSzgk(szgk);
|
|
|
-
|
|
|
- GqEntity szgq = new GqEntity();
|
|
|
- szgq.setId(szgqid);
|
|
|
- entity.setSzgq(szgq);
|
|
|
-
|
|
|
- GkjyrEntity ssjyr = new GkjyrEntity();
|
|
|
- ssjyr.setId(ssjyrid);
|
|
|
- entity.setSsjyr(ssjyr);
|
|
|
-
|
|
|
- GqEntity gq = gqService.findOne(szgqid);
|
|
|
- entity.setSsgkglbm(gq != null ? gq.getSsgkglbm() : null);
|
|
|
-
|
|
|
- MtEntity ssmt = new MtEntity();
|
|
|
- ssmt.setId(ssmtid);
|
|
|
- entity.setSsmt(ssmt);
|
|
|
-
|
|
|
- if (!StringUtils.isEmpty(sffzid)) {
|
|
|
- CodeEntity sffz = new CodeEntity(sffzid);
|
|
|
- entity.setSffz(sffz);
|
|
|
- }
|
|
|
- if (!StringUtils.isEmpty(sfdwkfid)) {
|
|
|
- CodeEntity sfdwkf = new CodeEntity(sfdwkfid);
|
|
|
- entity.setSfdwkf(sfdwkf);
|
|
|
- }
|
|
|
-
|
|
|
- if (!StringUtils.isEmpty(zyhbwflid)) {
|
|
|
- CodeEntity zyhbwfl = new CodeEntity(zyhbwflid);
|
|
|
- entity.setZyhbwfl(zyhbwfl);
|
|
|
- }
|
|
|
- if (!StringUtils.isEmpty(fwlxid)) {
|
|
|
- CodeEntity fwlx = new CodeEntity(fwlxid);
|
|
|
- entity.setFwlx(fwlx);
|
|
|
- }
|
|
|
- if (!StringUtils.isEmpty(wxpbwid)) {
|
|
|
- CodeEntity wxpbw = new CodeEntity(wxpbwid);
|
|
|
- entity.setWxpbw(wxpbw);
|
|
|
- }
|
|
|
- if (!StringUtils.isEmpty(bwsxid)) {
|
|
|
- CodeEntity bwsx = new CodeEntity(bwsxid);
|
|
|
- entity.setBwsx(bwsx);
|
|
|
- }
|
|
|
- if (!StringUtils.isEmpty(bwszsxid)) {
|
|
|
- CodeEntity bwszsx = new CodeEntity(bwszsxid);
|
|
|
- entity.setBwszsx(bwszsx);
|
|
|
- }
|
|
|
- if (!StringUtils.isEmpty(sclxid)) {
|
|
|
- CodeEntity sclx = new CodeEntity(sclxid);
|
|
|
- entity.setSclx(sclx);
|
|
|
- }
|
|
|
- if (!StringUtils.isEmpty(jgxsid)) {
|
|
|
- CodeEntity jgxs = new CodeEntity(jgxsid);
|
|
|
- entity.setJgxs(jgxs);
|
|
|
- }
|
|
|
-
|
|
|
- if (!StringUtils.isEmpty(sszyqid)) {
|
|
|
- ZyqEntity zyq = new ZyqEntity();
|
|
|
- zyq.setId(sszyqid);
|
|
|
- entity.setSszyq(zyq);
|
|
|
- }
|
|
|
- if (!StringUtils.isEmpty(zlsid)) {
|
|
|
- CodeEntity zls = new CodeEntity(zlsid);
|
|
|
- entity.setZls(zls);
|
|
|
- }
|
|
|
- if (!StringUtils.isEmpty(xpid)) {
|
|
|
- CodeEntity xp = new CodeEntity(xpid);
|
|
|
- entity.setXp(xp);
|
|
|
- ;
|
|
|
- }
|
|
|
- if (!StringUtils.isEmpty(bwszhdid)) {
|
|
|
- CodeEntity bwszhd = new CodeEntity(bwszhdid);
|
|
|
- entity.setBwszhd(bwszhd);
|
|
|
- }
|
|
|
- if (!StringUtils.isEmpty(kbcblxid)) {
|
|
|
- CodeEntity kbcblx = new CodeEntity(kbcblxid);
|
|
|
- entity.setKbcblx(kbcblx);
|
|
|
- }
|
|
|
-
|
|
|
- if (!StringUtils.isEmpty(path) && path.indexOf("bg") > 0) {
|
|
|
- if (path.indexOf("add") > 0) {
|
|
|
- entity.setRecordStatus(BaseEntity.RECORE_STATE_COPY);
|
|
|
- } else {
|
|
|
- entity.setRecordStatus(BaseEntity.RECORE_STATE_BGFLAG);
|
|
|
- }
|
|
|
- }
|
|
|
- bwService.save(entity);
|
|
|
- } else {// 新增
|
|
|
- CodeEntity szd = new CodeEntity(szdid);
|
|
|
- code.setSzd(szd);
|
|
|
-
|
|
|
- GkEntity szgk = new GkEntity();
|
|
|
- szgk.setId(szgkid);
|
|
|
- code.setSzgk(szgk);
|
|
|
-
|
|
|
- GqEntity szgq = new GqEntity();
|
|
|
- szgq.setId(szgqid);
|
|
|
- code.setSzgq(szgq);
|
|
|
-
|
|
|
- GkjyrEntity ssjyr = new GkjyrEntity();
|
|
|
- ssjyr.setId(ssjyrid);
|
|
|
- code.setSsjyr(ssjyr);
|
|
|
-
|
|
|
- GqEntity gq = gqService.findOne(szgqid);
|
|
|
- code.setSsgkglbm(gq != null ? gq.getSsgkglbm() : null);
|
|
|
-
|
|
|
- MtEntity ssmt = new MtEntity();
|
|
|
- ssmt.setId(ssmtid);
|
|
|
- code.setSsmt(ssmt);
|
|
|
+ entity = bwService.findOne(code.getId());
|
|
|
+ }
|
|
|
+ entity.setBwcd(code.getBwcd());
|
|
|
+ entity.setBwmc(code.getBwmc());
|
|
|
+ /* entity.setBwszsx(code.getBwszsx()); */
|
|
|
+ if (code.getBwyt() != null && code.getBwyt().startsWith(",")) {
|
|
|
+ entity.setBwyt(code.getBwyt().substring(1));
|
|
|
+ } else {
|
|
|
+ entity.setBwyt(code.getBwyt());
|
|
|
+ }
|
|
|
+ entity.setHckpnl(code.getHckpnl());
|
|
|
+ entity.setJd(code.getJd());
|
|
|
+ entity.setJgysnf(code.getJgysnf());
|
|
|
+ entity.setJtjgisdyidh(code.getJtjgisdyidh());
|
|
|
+ /* entity.setNhwtgnl(code.getNhwtgnl()); */
|
|
|
+ entity.setNwxhwttl(code.getNwxhwttl());
|
|
|
+ entity.setQysjsh(code.getQysjsh());
|
|
|
+ entity.setQysjss(code.getQysjss());
|
|
|
+ /* entity.setSclx(code.getSclx()); */
|
|
|
+ entity.setSjkpnl(code.getSjkpnl());
|
|
|
+ entity.setSjtgnl(code.getSjtgnl());
|
|
|
+ entity.setTcnf(code.getTcnf());
|
|
|
+ entity.setWd(code.getWd());
|
|
|
+ entity.setZyrkfw(code.getZyrkfw());
|
|
|
+ entity.setJgxs(code.getJgxs());
|
|
|
+ entity.setDtsj(code.getDtsj());
|
|
|
+ entity.setBwdm(code.getBwdm());
|
|
|
+ /* entity.setSfdwkf(code.getSfdwkf()); */
|
|
|
+ /* entity.setNjzxtgnl(code.getNjzxtgnl()); */
|
|
|
+ /* entity.setSclx(code.getSclx()); */
|
|
|
+ entity.setJgxs(code.getJgxs());
|
|
|
+ entity.setHcnlxztj(code.getHcnlxztj());
|
|
|
+ entity.setNhwtgnl(code.getNhwtgnl());
|
|
|
+ entity.setHwgs(code.getHwgs());
|
|
|
+ entity.setHwhc(code.getHwhc());
|
|
|
+ entity.setNjzxtgnl(code.getNjzxtgnl());
|
|
|
+ entity.setJzxhc(code.getJzxhc());
|
|
|
+ entity.setJzxgs(code.getJzxhc());
|
|
|
+ entity.setGzsj(code.getGzsj());
|
|
|
+ entity.setGzhc(code.getGzhc());
|
|
|
+ entity.setGzgs(code.getGzgs());
|
|
|
+ entity.setLksj(code.getLksj());
|
|
|
+ entity.setLkhc(code.getLkhc());
|
|
|
+ entity.setLkgs(code.getLkgs());
|
|
|
+ entity.setBwgs(code.getBwgs());
|
|
|
+ entity.setBz(code.getBz());
|
|
|
+ entity.setZyid(code.getZyid());
|
|
|
+ CodeEntity szd = new CodeEntity(szdid);
|
|
|
+ entity.setSzd(szd);
|
|
|
+
|
|
|
+ GkEntity szgk = new GkEntity();
|
|
|
+ szgk.setId(szgkid);
|
|
|
+ entity.setSzgk(szgk);
|
|
|
+
|
|
|
+ GqEntity szgq = new GqEntity();
|
|
|
+ szgq.setId(szgqid);
|
|
|
+ entity.setSzgq(szgq);
|
|
|
+
|
|
|
+ GkjyrEntity ssjyr = new GkjyrEntity();
|
|
|
+ ssjyr.setId(ssjyrid);
|
|
|
+ entity.setSsjyr(ssjyr);
|
|
|
+
|
|
|
+ GqEntity gq = gqService.findOne(szgqid);
|
|
|
+ entity.setSsgkglbm(gq != null ? gq.getSsgkglbm() : null);
|
|
|
+
|
|
|
+ MtEntity ssmt = new MtEntity();
|
|
|
+ ssmt.setId(ssmtid);
|
|
|
+ entity.setSsmt(ssmt);
|
|
|
+
|
|
|
+ if (!StringUtils.isEmpty(sffzid)) {
|
|
|
+ CodeEntity sffz = new CodeEntity(sffzid);
|
|
|
+ entity.setSffz(sffz);
|
|
|
+ }
|
|
|
+ if (!StringUtils.isEmpty(sfdwkfid)) {
|
|
|
+ CodeEntity sfdwkf = new CodeEntity(sfdwkfid);
|
|
|
+ entity.setSfdwkf(sfdwkf);
|
|
|
+ }
|
|
|
|
|
|
- if (!StringUtils.isEmpty(sffzid)) {
|
|
|
- CodeEntity sffz = new CodeEntity(sffzid);
|
|
|
- code.setSffz(sffz);
|
|
|
- }
|
|
|
- if (!StringUtils.isEmpty(zyhbwflid)) {
|
|
|
- CodeEntity zyhbwfl = new CodeEntity(zyhbwflid);
|
|
|
- code.setZyhbwfl(zyhbwfl);
|
|
|
- }
|
|
|
- if (!StringUtils.isEmpty(fwlxid)) {
|
|
|
- CodeEntity fwlx = new CodeEntity(fwlxid);
|
|
|
- code.setFwlx(fwlx);
|
|
|
- }
|
|
|
- if (!StringUtils.isEmpty(wxpbwid)) {
|
|
|
- CodeEntity wxpbw = new CodeEntity(wxpbwid);
|
|
|
- code.setWxpbw(wxpbw);
|
|
|
- }
|
|
|
- if (!StringUtils.isEmpty(bwsxid)) {
|
|
|
- CodeEntity bwsx = new CodeEntity(bwsxid);
|
|
|
- code.setBwsx(bwsx);
|
|
|
- }
|
|
|
+ if (!StringUtils.isEmpty(zyhbwflid)) {
|
|
|
+ CodeEntity zyhbwfl = new CodeEntity(zyhbwflid);
|
|
|
+ entity.setZyhbwfl(zyhbwfl);
|
|
|
+ }
|
|
|
+ if (!StringUtils.isEmpty(fwlxid)) {
|
|
|
+ CodeEntity fwlx = new CodeEntity(fwlxid);
|
|
|
+ entity.setFwlx(fwlx);
|
|
|
+ }
|
|
|
+ if (!StringUtils.isEmpty(wxpbwid)) {
|
|
|
+ CodeEntity wxpbw = new CodeEntity(wxpbwid);
|
|
|
+ entity.setWxpbw(wxpbw);
|
|
|
+ }
|
|
|
+ if (!StringUtils.isEmpty(bwsxid)) {
|
|
|
+ CodeEntity bwsx = new CodeEntity(bwsxid);
|
|
|
+ entity.setBwsx(bwsx);
|
|
|
+ }
|
|
|
+ if (!StringUtils.isEmpty(bwszsxid)) {
|
|
|
+ CodeEntity bwszsx = new CodeEntity(bwszsxid);
|
|
|
+ entity.setBwszsx(bwszsx);
|
|
|
+ }
|
|
|
+ if (!StringUtils.isEmpty(sclxid)) {
|
|
|
+ CodeEntity sclx = new CodeEntity(sclxid);
|
|
|
+ entity.setSclx(sclx);
|
|
|
+ }
|
|
|
+ if (!StringUtils.isEmpty(jgxsid)) {
|
|
|
+ CodeEntity jgxs = new CodeEntity(jgxsid);
|
|
|
+ entity.setJgxs(jgxs);
|
|
|
+ }
|
|
|
|
|
|
- if (!StringUtils.isEmpty(sfdwkfid)) {
|
|
|
- CodeEntity sfdwkf = new CodeEntity(sfdwkfid);
|
|
|
- code.setSfdwkf(sfdwkf);
|
|
|
- }
|
|
|
- if (!StringUtils.isEmpty(bwszsxid)) {
|
|
|
- CodeEntity bwszsx = new CodeEntity(bwszsxid);
|
|
|
- code.setBwszsx(bwszsx);
|
|
|
- }
|
|
|
- if (!StringUtils.isEmpty(sclxid)) {
|
|
|
- CodeEntity sclx = new CodeEntity(sclxid);
|
|
|
- code.setSclx(sclx);
|
|
|
- }
|
|
|
- if (!StringUtils.isEmpty(jgxsid)) {
|
|
|
- CodeEntity jgxs = new CodeEntity(jgxsid);
|
|
|
- code.setJgxs(jgxs);
|
|
|
- }
|
|
|
+ if (!StringUtils.isEmpty(sszyqid)) {
|
|
|
+ ZyqEntity zyq = new ZyqEntity();
|
|
|
+ zyq.setId(sszyqid);
|
|
|
+ entity.setSszyq(zyq);
|
|
|
+ }
|
|
|
+ if (!StringUtils.isEmpty(zlsid)) {
|
|
|
+ CodeEntity zls = new CodeEntity(zlsid);
|
|
|
+ entity.setZls(zls);
|
|
|
+ }
|
|
|
+ if (!StringUtils.isEmpty(xpid)) {
|
|
|
+ CodeEntity xp = new CodeEntity(xpid);
|
|
|
+ entity.setXp(xp);
|
|
|
+ ;
|
|
|
+ }
|
|
|
+ if (!StringUtils.isEmpty(bwszhdid)) {
|
|
|
+ CodeEntity bwszhd = new CodeEntity(bwszhdid);
|
|
|
+ entity.setBwszhd(bwszhd);
|
|
|
+ }
|
|
|
+ if (!StringUtils.isEmpty(kbcblxid)) {
|
|
|
+ CodeEntity kbcblx = new CodeEntity(kbcblxid);
|
|
|
+ entity.setKbcblx(kbcblx);
|
|
|
+ }
|
|
|
|
|
|
- if (!StringUtils.isEmpty(sszyqid)) {
|
|
|
- ZyqEntity zyq = new ZyqEntity();
|
|
|
- zyq.setId(sszyqid);
|
|
|
- code.setSszyq(zyq);
|
|
|
- }
|
|
|
- if (!StringUtils.isEmpty(zlsid)) {
|
|
|
- CodeEntity zls = new CodeEntity(zlsid);
|
|
|
- code.setZls(zls);
|
|
|
- }
|
|
|
- if (!StringUtils.isEmpty(xpid)) {
|
|
|
- CodeEntity xp = new CodeEntity(xpid);
|
|
|
- code.setXp(xp);
|
|
|
- ;
|
|
|
- }
|
|
|
- if (!StringUtils.isEmpty(bwszhdid)) {
|
|
|
- CodeEntity bwszhd = new CodeEntity(bwszhdid);
|
|
|
- code.setBwszhd(bwszhd);
|
|
|
- }
|
|
|
- if (!StringUtils.isEmpty(kbcblxid)) {
|
|
|
- CodeEntity kbcblx = new CodeEntity(kbcblxid);
|
|
|
- code.setKbcblx(kbcblx);
|
|
|
- }
|
|
|
- if (!StringUtils.isEmpty(path) && path.indexOf("bg") > 0) {
|
|
|
- if (path.indexOf("add") > 0) {
|
|
|
- code.setRecordStatus(BaseEntity.RECORE_STATE_COPY);
|
|
|
- } else {
|
|
|
- code.setRecordStatus(BaseEntity.RECORE_STATE_BGFLAG);
|
|
|
- }
|
|
|
+ if (!StringUtils.isEmpty(path) && path.indexOf("bg") > 0) {
|
|
|
+ if (path.indexOf("add") > 0) {
|
|
|
+ entity.setRecordStatus(BaseEntity.RECORE_STATE_COPY);
|
|
|
+ } else {
|
|
|
+ entity.setRecordStatus(BaseEntity.RECORE_STATE_BGFLAG);
|
|
|
}
|
|
|
- bwService.save(code);
|
|
|
}
|
|
|
+ bwService.save(entity);
|
|
|
// 如果是市级新增或者修改,保存后同步到省级
|
|
|
- try {
|
|
|
- if (GlobalData.DEPLOY_MODE.equals(Constants.DEPLOY_MODE_CITY) && needWS()) {
|
|
|
- BwWebService webService = bwService.getWebService(null);
|
|
|
- webService.save(code);
|
|
|
- code.setTbzt(Constants.YES);
|
|
|
- bwService.save(code);
|
|
|
- }
|
|
|
- } catch (Exception e) {
|
|
|
- code.setTbzt(Constants.NO);
|
|
|
- bwService.save(code);
|
|
|
- }
|
|
|
+// try {
|
|
|
+// if (GlobalData.DEPLOY_MODE.equals(Constants.DEPLOY_MODE_CITY) && needWS()) {
|
|
|
+// BwWebService webService = bwService.getWebService(null);
|
|
|
+// webService.save(code);
|
|
|
+// code.setTbzt(Constants.YES);
|
|
|
+// bwService.save(code);
|
|
|
+// }
|
|
|
+// } catch (Exception e) {
|
|
|
+// code.setTbzt(Constants.NO);
|
|
|
+// bwService.save(code);
|
|
|
+// }
|
|
|
} catch (Exception e) {
|
|
|
wr.setSuccess(false);
|
|
|
wr.setMessage("操作失败!");
|