Commit fca2f656 by 宋祥

Merge remote-tracking branch 'origin/dev' into dev

parents ef6a2782 3ccdb22b
......@@ -6,6 +6,8 @@ import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.core.security.UserSessionUtils;
import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.pz.domain.HPPZ009;
import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
......@@ -89,6 +91,57 @@ public class ServiceHPSC001 extends ServiceBase {
}
/**
* 保存操作.
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "企业管理",operType = "插入",operDesc = "保存")
public EiInfo save(EiInfo inInfo) {
try {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
// 写入数据
for (int i = 0; i < resultRows.size(); i++) {
HPSC001 hpsc001 = new HPSC001();
hpsc001.fromMap(resultRows.get(i));
if (hpsc001.getId() == null || hpsc001.getId() == 0) {
this.add(hpsc001);
} else {
this.modify(hpsc001);
}
}
inInfo = this.query(inInfo);
inInfo.setStatus(EiConstant.STATUS_DEFAULT);
inInfo.setMsg("操作成功!本次对[" + resultRows.size() + "]条数据保存成功!");
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "保存失败");
}
return inInfo;
}
/**
* 新增企业信息
*
* @param hpsc001
* @throws Exception
*/
private void add(HPSC001 hpsc001) throws Exception {
hpsc001.setStatus(CommonConstant.YesNo.NO_0);
hpsc001.setProjCode(SequenceGenerator.getNextSequence(HPConstant.SequenceId.PROJ_NUMBER));
DaoUtils.insert("HPSC001.insert", hpsc001);
}
/**
* 修改数据
*
* @param hpsc001
*/
private void modify(HPSC001 hpsc001) {
DaoUtils.update("HPSC001.update", hpsc001);
}
/**
* 修改操作.
*/
@OperationLogAnnotation(operModul = "销售管理",operType = "修改")
......
......@@ -53,7 +53,7 @@
</isNotEmpty>
<dynamic prepend="ORDER BY">
<isEmpty property="orderBy">
CREATED_TIME desc
STATUS,CREATED_TIME desc
</isEmpty>
</dynamic>
......
......@@ -106,7 +106,7 @@
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
STATUS,CREATED_TIME asc
</isEmpty>
</dynamic>
......
......@@ -138,7 +138,7 @@
$order$
</isNotEmpty>
<isEmpty property="order">
ID asc
STATUS,CREATED_TIME desc
</isEmpty>
</dynamic>
</sql>
......
......@@ -23,6 +23,7 @@
A.STATUS as "status", <!-- 状态 -->
A.PLAN_COMPLETION_DATE as "planCompletionDate", <!-- 计划完成日期 -->
A.FILE_PATH1 as "filePath1",
A.CREATED_TIME as "createdTime", <!-- 创建时间 -->
B.ID as "childId",
B.PROD_TASK_NO as "prodTaskNo",
B.PROD_ORDER_NO as "prodOrderNo",
......@@ -106,7 +107,7 @@
$order$
</isNotEmpty>
<isEmpty property="order">
ID ASC
A.CREATED_TIME desc
</isEmpty>
</dynamic>
</sql>
......
......@@ -46,8 +46,7 @@ $(function () {
deleteFunc();
},
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'update'
||e.eiInfo.extAttr.methodName == 'insert'
if(e.eiInfo.extAttr.methodName == 'save'
||e.eiInfo.extAttr.methodName == 'delete' ){
query();
}
......@@ -114,7 +113,7 @@ function check(id, auditStatus) {
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGridsData("result", "HPSC001", "insert", true);
JSUtils.submitGridsData("result", "HPSC001", "save", true);
}
});
}
......
......@@ -5,8 +5,8 @@ $(function () {
IPLATUI.EFGrid = {
"result": {
pageable: {
pageSize: 20,
pageSizes: [10, 20, 50, 70, 100],
pageSize: 5,
pageSizes: [5, 10, 20, 50, 100],
},
columns: [{
field: "operator",
......
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