万德隆调整
This commit is contained in:
parent
d3fc58a7e4
commit
aa5aac7e48
|
|
@ -62,6 +62,7 @@ import com.engine.salary.util.page.SalaryPageUtil;
|
|||
import com.engine.salary.util.valid.ValidUtil;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.weaver.general.TimeUtil;
|
||||
import com.weaver.util.threadPool.ThreadPoolUtil;
|
||||
import com.weaver.util.threadPool.constant.ModulePoolEnum;
|
||||
import com.weaver.util.threadPool.entity.LocalRunnable;
|
||||
|
|
@ -81,7 +82,6 @@ import weaver.file.ImageFileManager;
|
|||
import weaver.formmode.data.ModeDataIdUpdate;
|
||||
import weaver.formmode.setup.ModeRightInfo;
|
||||
import weaver.general.BaseBean;
|
||||
import weaver.general.TimeUtil;
|
||||
import weaver.hrm.User;
|
||||
import weaver.wechat.util.Utils;
|
||||
|
||||
|
|
@ -1750,34 +1750,48 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
|
|||
// 获取建模模块id
|
||||
BaseBean baseBean = new BaseBean();
|
||||
String modeId = baseBean.getPropValue("wdlSalary", "lsbzgzjg_mode_id");
|
||||
Map<Integer, Integer> idRelationMap = new HashMap<>();
|
||||
if (CollectionUtils.isNotEmpty(mainList)) {
|
||||
String currDate = String.format("'%s'", TimeUtil.getCurrentDateString());
|
||||
String currDate = String.format("%s", TimeUtil.getCurrentDateString());
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss");
|
||||
String currTime = String.format("'%s'", sdf.format(new Date()));
|
||||
|
||||
List<List<WdlGzjgDTO>> partition = Lists.partition(mainList, 500);
|
||||
partition.forEach(part -> {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("insert into uf_bzgzjgbls(formmodeid,modedatacreater,modedatacreatertype,modedatacreatedate,modedatacreatetime,id,lb,bgdd,gwmc,gwzj,lsbb) values ");
|
||||
for (WdlGzjgDTO data : part) {
|
||||
sb.append("(")
|
||||
.append(modeId).append(",1,0,").append(currDate).append(",").append(currTime).append(",")
|
||||
.append(data.getId()).append(",")
|
||||
.append(data.getLb()).append(",")
|
||||
.append(data.getBgdd()).append(",")
|
||||
.append(data.getGwmc()).append(",'")
|
||||
.append(data.getGwzj()).append("','")
|
||||
// .append(data.getGzsp()).append(",'")
|
||||
// .append(data.getMxbmr()).append("','")
|
||||
// .append(data.getGwzj1()).append("','")
|
||||
.append(data.getLsbb()).append("'),");
|
||||
}
|
||||
boolean execute = rs.execute(sb.substring(0, sb.length() - 1).toString());
|
||||
String currTime = String.format("%s", sdf.format(new Date()));
|
||||
for (WdlGzjgDTO data : mainList) {
|
||||
int newId = ModeDataIdUpdate.getInstance().getModeDataNewIdByUUID("uf_bzgzjgbls", Integer.valueOf(modeId), user.getUID(), 0, "", "");
|
||||
idRelationMap.put(data.getId(), newId);
|
||||
data.setId(newId);
|
||||
String sql = "update uf_bzgzjgbls set lb=?,bgdd=?,gwmc=?,gwzj=?,lsbb=?,modedatacreatedate=?,modedatacreatetime=? where id =" + newId;
|
||||
boolean execute = rs.executeUpdate(sql, Arrays.asList(data.getLb(), data.getBgdd(), data.getGwmc(), data.getGwzj(), data.getLsbb(),currDate,currTime));
|
||||
if (!execute) {
|
||||
baseBean.writeLog("主表复制失败" + rs.getExceptionMsg());
|
||||
throw new SalaryRunTimeException("导入失败,请联系管理员");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// partition.forEach(part -> {
|
||||
// for (WdlGzjgDTO data : part) {
|
||||
// int newId = ModeDataIdUpdate.getInstance().getModeDataNewIdByUUID("uf_bzgzjgbls", Integer.valueOf(modeId), user.getUID(), 0, "", "");
|
||||
// mainData.setId(newId);
|
||||
// StringBuilder sb = new StringBuilder();
|
||||
// sb.append("insert into uf_bzgzjgbls(formmodeid,modedatacreater,modedatacreatertype,modedatacreatedate,modedatacreatetime,id,lb,bgdd,gwmc,gwzj,lsbb) values ");
|
||||
//
|
||||
// sb.append("(")
|
||||
// .append(modeId).append(",1,0,").append(currDate).append(",").append(currTime).append(",")
|
||||
// .append(data.getId()).append(",")
|
||||
// .append(data.getLb()).append(",")
|
||||
// .append(data.getBgdd()).append(",")
|
||||
// .append(data.getGwmc()).append(",'")
|
||||
// .append(data.getGwzj()).append("','")
|
||||
// // .append(data.getGzsp()).append(",'")
|
||||
// // .append(data.getMxbmr()).append("','")
|
||||
// // .append(data.getGwzj1()).append("','")
|
||||
// .append(data.getLsbb()).append("'),");
|
||||
// }
|
||||
// boolean execute = rs.execute(sb.substring(0, sb.length() - 1).toString());
|
||||
// if (!execute) {
|
||||
// baseBean.writeLog("主表复制失败" + rs.getExceptionMsg());
|
||||
// throw new SalaryRunTimeException("导入失败,请联系管理员");
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
if (CollectionUtils.isNotEmpty(detailList)) {
|
||||
|
|
@ -1785,11 +1799,10 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe
|
|||
List<List<WdlGzjgDtPO>> partition = Lists.partition(detailList, 500);
|
||||
partition.forEach(part -> {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("insert into uf_bzgzjgbls_dt1(id,mainid,xzxm,je) values ");
|
||||
sb.append("insert into uf_bzgzjgbls_dt1(mainid,xzxm,je) values ");
|
||||
for (WdlGzjgDtPO data : part) {
|
||||
sb.append("(")
|
||||
.append(data.getId()).append(",")
|
||||
.append(data.getMianid()).append(",'")
|
||||
.append(idRelationMap.get(data.getMianid())).append(",'")
|
||||
.append(data.getXzxm()).append("',")
|
||||
.append(data.getJe()).append("),");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue