Commit e8f1be20 by 江和松

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

parents 372b5a2c ce27569a
...@@ -3,12 +3,14 @@ package com.baosight.hggp.hg.cw.service; ...@@ -3,12 +3,14 @@ package com.baosight.hggp.hg.cw.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum; import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.dao.DaoUtils; import com.baosight.hggp.core.dao.DaoUtils;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.cw.domain.HGCW002; import com.baosight.hggp.hg.cw.domain.HGCW002;
import com.baosight.hggp.hg.cw.tools.HGCWTools; import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO; import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.pz.domain.HGPZ002; import com.baosight.hggp.hg.pz.domain.HGPZ002;
import com.baosight.hggp.hg.pz.domain.HGPZ003; import com.baosight.hggp.hg.pz.domain.HGPZ003;
import com.baosight.hggp.hg.pz.tools.HGPZTools; import com.baosight.hggp.hg.pz.tools.HGPZTools;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.hg.xs.domain.Org; import com.baosight.hggp.hg.xs.domain.Org;
import com.baosight.hggp.hg.xs.tools.HGXSTools; import com.baosight.hggp.hg.xs.tools.HGXSTools;
import com.baosight.hggp.util.CommonMethod; import com.baosight.hggp.util.CommonMethod;
...@@ -71,24 +73,15 @@ public class ServiceHGCW002A extends ServiceBase { ...@@ -71,24 +73,15 @@ public class ServiceHGCW002A extends ServiceBase {
}); });
} }
} else if (contractCategory.equals("2")) { } else if (contractCategory.equals("2")) {
List<Org> orgList = HGXSTools.XsOrg.queryByUser(); List<Company> list = UserSessionUtils.getRoleCompany();
if (CollectionUtils.isNotEmpty(orgList)) { for (Company c:list) {
Org org = orgList.get(0); UserVO userVO = new UserVO();
if (!org.getOrgType().equals("company")) { userVO.setUsercode(c.getCompanyCode());
//如果不是公司公司,则找到上一级 userVO.setUsername(c.getCompanyName());
Org org1 = HGXSTools.XsOrg.queryCompany(org.getOrgId()); userVOList.add(userVO);
UserVO userVO = new UserVO();
userVO.setUsercode(org1.getOrgId());
userVO.setUsername(org1.getOrgCname());
userVOList.add(userVO);
} else {
UserVO userVO = new UserVO();
userVO.setUsercode(org.getOrgId());
userVO.setUsername(org.getOrgCname());
userVOList.add(userVO);
} }
} }
}
inInfo.addBlock("partyAResult").addRows(userVOList); inInfo.addBlock("partyAResult").addRows(userVOList);
} catch (PlatException e) { } catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "甲方名称查询失败"); LogUtils.setDetailMsg(inInfo, e, "甲方名称查询失败");
...@@ -106,24 +99,15 @@ public class ServiceHGCW002A extends ServiceBase { ...@@ -106,24 +99,15 @@ public class ServiceHGCW002A extends ServiceBase {
List<UserVO> userVOList = new ArrayList<>(); List<UserVO> userVOList = new ArrayList<>();
String contractCategory = inInfo.getString("contractCategory"); String contractCategory = inInfo.getString("contractCategory");
if (contractCategory.equals("1")) { if (contractCategory.equals("1")) {
List<Org> orgList = HGXSTools.XsOrg.queryByUser(); List<Company> list = UserSessionUtils.getRoleCompany();
if (CollectionUtils.isNotEmpty(orgList)) { for (Company c:list) {
Org org = orgList.get(0); UserVO userVO = new UserVO();
if (!org.getOrgType().equals("company")) { userVO.setUsercode(c.getCompanyCode());
//如果不是公司公司,则找到上一级 userVO.setUsername(c.getCompanyName());
Org org1 = HGXSTools.XsOrg.queryCompany(org.getOrgId()); userVOList.add(userVO);
UserVO userVO = new UserVO();
userVO.setUsercode(org1.getOrgId());
userVO.setUsername(org1.getOrgCname());
userVOList.add(userVO);
} else {
UserVO userVO = new UserVO();
userVO.setUsercode(org.getOrgId());
userVO.setUsername(org.getOrgCname());
userVOList.add(userVO);
}
} }
} else if (contractCategory.equals("2")) { }
else if (contractCategory.equals("2")) {
List<HGPZ003> hgpz003List = HGCWTools.HgCw002.list(1); List<HGPZ003> hgpz003List = HGCWTools.HgCw002.list(1);
if (CollectionUtils.isNotEmpty(hgpz003List)) { if (CollectionUtils.isNotEmpty(hgpz003List)) {
hgpz003List.forEach(hgpz003 -> { hgpz003List.forEach(hgpz003 -> {
......
...@@ -2,11 +2,14 @@ package com.baosight.hggp.hg.cw.service; ...@@ -2,11 +2,14 @@ package com.baosight.hggp.hg.cw.service;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation; import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.common.DdynamicEnum; import com.baosight.hggp.common.DdynamicEnum;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.cw.domain.HGCW006; import com.baosight.hggp.hg.cw.domain.HGCW006;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.cw.vo.UserVO; import com.baosight.hggp.hg.cw.vo.UserVO;
import com.baosight.hggp.hg.pz.domain.HGPZ002; import com.baosight.hggp.hg.pz.domain.HGPZ002;
import com.baosight.hggp.hg.pz.domain.HGPZ003; import com.baosight.hggp.hg.pz.domain.HGPZ003;
import com.baosight.hggp.hg.pz.tools.HGPZTools; import com.baosight.hggp.hg.pz.tools.HGPZTools;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.hg.xs.domain.Org; import com.baosight.hggp.hg.xs.domain.Org;
import com.baosight.hggp.hg.xs.tools.HGXSTools; import com.baosight.hggp.hg.xs.tools.HGXSTools;
import com.baosight.hggp.util.CommonMethod; import com.baosight.hggp.util.CommonMethod;
...@@ -61,16 +64,13 @@ public class ServiceHGCW006A extends ServiceBase { ...@@ -61,16 +64,13 @@ public class ServiceHGCW006A extends ServiceBase {
Org org = orgList.get(0); Org org = orgList.get(0);
if (!org.getOrgType().equals("company")) { if (!org.getOrgType().equals("company")) {
//如果不是公司公司,则找到上一级 //如果不是公司公司,则找到上一级
Org org1 = HGXSTools.XsOrg.queryCompany(org.getOrgId()); List<Company> list = UserSessionUtils.getRoleCompany();
UserVO userVO = new UserVO(); for (Company c:list) {
userVO.setUsercode(org1.getOrgId()); UserVO userVO = new UserVO();
userVO.setUsername(org1.getOrgCname()); userVO.setUsercode(c.getCompanyCode());
userVOList.add(userVO); userVO.setUsername(c.getCompanyName());
} else { userVOList.add(userVO);
UserVO userVO = new UserVO(); }
userVO.setUsercode(org.getOrgId());
userVO.setUsername(org.getOrgCname());
userVOList.add(userVO);
} }
} }
inInfo.addBlock("partyAResult").addRows(userVOList); inInfo.addBlock("partyAResult").addRows(userVOList);
...@@ -79,5 +79,28 @@ public class ServiceHGCW006A extends ServiceBase { ...@@ -79,5 +79,28 @@ public class ServiceHGCW006A extends ServiceBase {
} }
return inInfo; return inInfo;
} }
/**
* 乙方名称查询
* @param inInfo
* @return
*/
public EiInfo partyBQuery(EiInfo inInfo) {
try {
List<UserVO> userVOList = new ArrayList<>();
String contractCategory = inInfo.getString("contractCategory");
List<HGPZ003> hgpz003List = HGCWTools.HgCw002.list(1);
if (CollectionUtils.isNotEmpty(hgpz003List)) {
hgpz003List.forEach(hgpz003 -> {
UserVO userVO = new UserVO();
userVO.setUsercode(hgpz003.getSupCode());
userVO.setUsername(hgpz003.getSupName());
userVOList.add(userVO);
});
}
inInfo.addBlock("partyAResult").addRows(userVOList);
} catch (PlatException e) {
LogUtils.setDetailMsg(inInfo, e, "乙方名称查询失败");
}
return inInfo;
}
} }
package com.baosight.hggp.hg.cw.service;
import cn.hutool.core.util.StrUtil;
import com.baosight.hggp.aspect.annotation.OperationLogAnnotation;
import com.baosight.hggp.core.security.UserSessionUtils;
import com.baosight.hggp.hg.cw.domain.HGCW001;
import com.baosight.hggp.hg.cw.domain.HGCW012;
import com.baosight.hggp.hg.cw.domain.HGCW055;
import com.baosight.hggp.hg.cw.tools.HGCWTools;
import com.baosight.hggp.hg.kc.domain.*;
import com.baosight.hggp.hg.kc.tools.HGKCTools;
import com.baosight.hggp.hg.xs.domain.Company;
import com.baosight.hggp.util.AssertUtils;
import com.baosight.hggp.util.EiInfoUtils;
import com.baosight.hggp.util.LogUtils;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceBase;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @className: com.baosight.hggp.hg.cw.service.ServiceHGCW055
* @description: 成本核算
* @author: lwj
* @create: 2024-06-26 15:52
*/
public class ServiceHGCW055 extends ServiceBase {
/**
* 画面初始化.
*/
@OperationLogAnnotation(operModul = "成本核算",operType = "查询",operDesc = "初始化")
public EiInfo initLoad(EiInfo inInfo) {
try {
EiInfoUtils.addBlock(inInfo,"roleCompany", UserSessionUtils.getRoleCompany(), Company.class);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 查询操作
*
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "成本核算",operType = "查询",operDesc = "查询")
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, HGCW055.QUERY, new HGCW055());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 数据检查操作
* @param inInfo
* @return
*/
@OperationLogAnnotation(operModul = "成本核算",operType = "查询",operDesc = "数据检查")
public EiInfo checkData(EiInfo inInfo){
try {
this.checkAllData(inInfo);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
/**
* 成本核算操作
* @param inInfo
* @return
*/
public EiInfo calculate(EiInfo inInfo){
try {
this.checkAllData(inInfo);
if ("100".equals(inInfo.getString("resultCode"))) {
// 检查返回码
String resultCode = "200";
String resultDesc = "成本核算完成";
String id = inInfo.getString("id");
AssertUtils.isNull(id, "成本核算ID不能为空!");
List<HGCW055> results = dao.query(HGCW055.QUERY, new HashMap<String, Object>() {
{
put("id", id);
}
});
if (results.size() > 0) {
HGCW055 hgcw055 = results.get(0);
// 成本核算步骤:
// 1,入库成本核算;
// 2,出库成本核算;
// 3,收发存汇总数据同步接口;
// 4,产副品制造成本核算接口;
// 5.费用归集完成
// 6.费用分摊完成
}
inInfo.set("resultCode",resultCode);
inInfo.set("resultDesc",resultDesc);
}
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
return inInfo;
}
private void checkAllData(EiInfo inInfo) {
// 检查返回码
String resultCode = "100";
String resultDesc = "数据检查完成";
String id = inInfo.getString("id");
AssertUtils.isNull(id, "成本核算ID不能为空!");
List<HGCW055> results = dao.query(HGCW055.QUERY,new HashMap<String,Object>(){
{put("id",id);}
});
if (results.size() > 0) {
HGCW055 hgcw055 = results.get(0);
Map paramMap = new HashMap();
paramMap.put("billDate", StrUtil.concat(true,hgcw055.getYear(),hgcw055.getMonth()));
paramMap.put("submitStatus", 0);
paramMap.put("accountPeriodStatus", 1);
paramMap.put("companyCode", hgcw055.getCompanyCode());
// 点击数据检查按钮弹出窗口,点击执行进行数据检查,检查顺序和显示内容如下:
// 1.业务单据日期为当月会计期的日期范围采购入库单提交或未提交;HGKC001 采购入库
List<HGKC001> hgkc001List = HGKCTools.HgKc001.checkList(paramMap);
if (hgkc001List.size() > 0) {
resultCode = "101";
resultDesc = "采购入库单未提交";
}
// 2.业务单据日期为当月会计期的日期范围采购发票提交或未提交;HGCW012 采购发票
List<HGCW012> hgcw012List = HGCWTools.HgCw012.checkList(paramMap);
if (hgcw012List.size() > 0) {
resultCode = "102";
resultDesc = "采购发票未审核";
}
// 3.业务单据日期为当月会计期的日期范围生产领用单提交或未提交;HGKC008 生产领料单
List<HGKC008> hgkc008List = HGKCTools.HgKc008.checkList(paramMap);
if (hgkc008List.size() > 0) {
resultCode = "103";
resultDesc = "生产领料单未提交";
}
// 4.业务单据日期为当月会计期的日期范围生产入库单提交或未提交;HGKC003 生产入库单
List<HGKC003> hgkc003List = HGKCTools.HgKc003.checkList(paramMap);
if (hgkc003List.size() > 0) {
resultCode = "104";
resultDesc = "生产入库单未提交";
}
// 5.业务单据日期为当月会计期的日期范围销售出库单提交或未提交;HGKC004 销售出库单
List<HGKC004> hgkc004List = HGKCTools.HgKc004.checkList(paramMap);
if (hgkc004List.size() > 0) {
resultCode = "105";
resultDesc = "销售出库单未提交";
}
// 6.业务单据日期为当月会计期的日期范围其他入库单提交或未提交;HGKC006 其他入库单
List<HGKC006> hgkc006List = HGKCTools.HgKc006.checkList(paramMap);
if (hgkc006List.size() > 0) {
resultCode = "106";
resultDesc = "其他入库单未提交";
}
// 7.业务单据日期为当月会计期的日期范围其他出库单提交或未提交;HGKC007 其他出库单
List<HGKC007> hgkc007List = HGKCTools.HgKc007.checkList(paramMap);
if (hgkc007List.size() > 0) {
resultCode = "107";
resultDesc = "其他出库单未提交";
}
// 8.当前公司的当月会计期是否为关账状态
List<HGCW001> hgcw001List = HGCWTools.HgCw001.checkList(paramMap);
if (hgcw001List.size() > 0) {
resultCode = "108";
resultDesc = "账期为开帐状态";
}
}
inInfo.set("resultCode",resultCode);
inInfo.set("resultDesc",resultDesc);
}
}
...@@ -229,4 +229,44 @@ ...@@ -229,4 +229,44 @@
ID = #id# ID = #id#
</update> </update>
<select id="queryCheckList" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.cw.domain.HGCW001">
SELECT
ID as "id",
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
ACCOUNT_YEAR as "accountYear", <!-- 会计年度 -->
ACCOUNT_PERIOD as "accountPeriod", <!-- 会计期 -->
ACCOUNT_PERIOD_STATUS as "accountPeriodStatus", <!-- 会计期状态0:关账1:开账 -->
ACCOUNT_PERIOD_DATE_START as "accountPeriodDateStart", <!-- 账期开始日期 -->
ACCOUNT_PERIOD_DATE_END as "accountPeriodDateEnd", <!-- 账期结束日期 -->
CREATED_BY as "createdBy", <!-- 记录创建者 -->
CREATED_NAME as "createdName", <!-- 记录创建名称 -->
CREATED_TIME as "createdTime", <!-- 记录创建时间 -->
UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DEP_CODE as "depCode" <!-- 部门编码 -->
FROM ${hggpSchema}.HGCW001 WHERE 1=1
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="billDate">
ACCOUNT_PERIOD = #billDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountPeriodStatus">
ACCOUNT_PERIOD_STATUS = #accountPeriodStatus#
</isNotEmpty>
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
</isEmpty>
</dynamic>
</select>
</sqlMap> </sqlMap>
...@@ -325,4 +325,25 @@ ...@@ -325,4 +325,25 @@
ID = #id# ID = #id#
</update> </update>
<select id="queryCheckList" resultClass="com.baosight.hggp.hg.cw.domain.HGCW012">
SELECT
<include refid="column"/>
FROM ${hggpSchema}.HGCW012
WHERE 1 = 1
<isNotEmpty prepend=" AND " property="billDate">
LEFT(RECEIVE_DATE,6) = #billDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="submitStatus">
REVIEW_STATUS = #submitStatus#
</isNotEmpty>
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID desc
</isEmpty>
</dynamic>
</select>
</sqlMap> </sqlMap>
...@@ -69,18 +69,18 @@ ...@@ -69,18 +69,18 @@
A.YEAR AS "year", A.YEAR AS "year",
A.MONTH as "month", A.MONTH as "month",
A.ID AS "id", A.ID AS "id",
SUM(B.AMOUNT) AS "amount" B.AMOUNT AS "amount"
from ${hggpSchema}.HGCW051 a, from ${hggpSchema}.HGCW051 a
${hggpSchema}.HGCW052 b left JOIN (SELECT HGCW051_ID, SUM(AMOUNT) as AMOUNT FROM ${hggpSchema}.HGCW052 GROUP BY HGCW051_ID) b on A.ID = B.HGCW051_ID
WHERE A.ID = B.HGCW051_ID
WHERE 1 = 1
<isNotEmpty prepend=" AND " property="companyCode"> <isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode# a.COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="month"> <isNotEmpty prepend=" AND " property="month">
MONTH = #month# a.MONTH = #month#
</isNotEmpty> </isNotEmpty>
GROUP BY A.COMPANY_CODE,A.COMPANY_NAME,A.YEAR, A.MONTH,A.ID
</select> </select>
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd"> <!-- table information
Generate time : 2024-06-26 15:48:30
Version : 1.0
schema : hggp
tableName : HGCW055
ID BIGINT NOT NULL primarykey,
CREATED_BY VARCHAR NOT NULL,
CREATED_NAME VARCHAR NOT NULL,
CREATED_TIME VARCHAR NOT NULL,
UPDATED_BY VARCHAR NOT NULL,
UPDATED_NAME VARCHAR NOT NULL,
UPDATED_TIME VARCHAR NOT NULL,
DELETE_FLAG TINYINT,
COMPANY_CODE VARCHAR,
COMPANY_NAME VARCHAR,
YEAR VARCHAR NOT NULL,
MONTH VARCHAR NOT NULL,
CHECK_STATUS VARCHAR,
CHECK_BY VARCHAR,
CHECK_NAME VARCHAR,
CHECK_TIME VARCHAR
-->
<sqlMap namespace="HGCW055">
<sql id="condition">
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="year">
YEAR = #year#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="month">
MONTH = #month#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="checkStatus">
CHECK_STATUS = #checkStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="checkBy">
CHECK_BY = #checkBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="checkName">
CHECK_NAME = #checkName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="checkTime">
CHECK_TIME = #checkTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="yearMonth">
CONCAT(YEAR, MONTH) = #yearMonth#
</isNotEmpty>
</sql>
<select id="query" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.cw.domain.HGCW055">
SELECT
ID as "id",
CREATED_BY as "createdBy", <!-- 记录创建者 -->
CREATED_NAME as "createdName", <!-- 记录创建名称 -->
CREATED_TIME as "createdTime", <!-- 记录创建时间 -->
UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DELETE_FLAG as "deleteFlag", <!-- 0-未删除,1-已删除 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
YEAR as "year", <!-- 年份 -->
MONTH as "month", <!-- 月份 -->
CHECK_STATUS as "checkStatus", <!-- 核算状态 -->
CHECK_BY as "checkBy", <!-- 核算人 -->
CHECK_NAME as "checkName", <!-- 核算人名称 -->
CHECK_TIME as "checkTime" <!-- 核算时间 -->
FROM ${hggpSchema}.HGCW055 WHERE 1=1
<include refid="condition" />
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
</isEmpty>
</dynamic>
</select>
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGCW055 WHERE 1=1
<include refid="condition" />
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="year">
YEAR = #year#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="month">
MONTH = #month#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="checkStatus">
CHECK_STATUS = #checkStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="checkBy">
CHECK_BY = #checkBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="checkName">
CHECK_NAME = #checkName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="checkTime">
CHECK_TIME = #checkTime#
</isNotEmpty>
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGCW055 (
CREATED_BY, <!-- 记录创建者 -->
CREATED_NAME, <!-- 记录创建名称 -->
CREATED_TIME, <!-- 记录创建时间 -->
UPDATED_BY, <!-- 记录修改者 -->
UPDATED_NAME, <!-- 记录修改名称 -->
UPDATED_TIME, <!-- 记录修改时间 -->
DELETE_FLAG, <!-- 0-未删除,1-已删除 -->
COMPANY_CODE, <!-- 公司编码 -->
COMPANY_NAME, <!-- 公司名称 -->
YEAR, <!-- 年份 -->
MONTH, <!-- 月份 -->
CHECK_STATUS, <!-- 核算状态 -->
CHECK_BY, <!-- 核算人 -->
CHECK_NAME, <!-- 核算人名称 -->
CHECK_TIME <!-- 核算时间 -->
)
VALUES (#createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #year#, #month#, #checkStatus#, #checkBy#, #checkName#, #checkTime#)
</insert>
<delete id="delete">
DELETE FROM ${hggpSchema}.HGCW055 WHERE
ID = #id#
</delete>
<update id="update">
UPDATE ${hggpSchema}.HGCW055
SET
CREATED_BY = #createdBy#, <!-- 记录创建者 -->
CREATED_NAME = #createdName#, <!-- 记录创建名称 -->
CREATED_TIME = #createdTime#, <!-- 记录创建时间 -->
UPDATED_BY = #updatedBy#, <!-- 记录修改者 -->
UPDATED_NAME = #updatedName#, <!-- 记录修改名称 -->
UPDATED_TIME = #updatedTime#, <!-- 记录修改时间 -->
DELETE_FLAG = #deleteFlag#, <!-- 0-未删除,1-已删除 -->
COMPANY_CODE = #companyCode#, <!-- 公司编码 -->
COMPANY_NAME = #companyName#, <!-- 公司名称 -->
YEAR = #year#, <!-- 年份 -->
MONTH = #month#, <!-- 月份 -->
CHECK_STATUS = #checkStatus#, <!-- 核算状态 -->
CHECK_BY = #checkBy#, <!-- 核算人 -->
CHECK_NAME = #checkName#, <!-- 核算人名称 -->
CHECK_TIME = #checkTime# <!-- 核算时间 -->
WHERE
ID = #id#
</update>
</sqlMap>
...@@ -25,6 +25,13 @@ import java.util.stream.Collectors; ...@@ -25,6 +25,13 @@ import java.util.stream.Collectors;
public class HGCWTools { public class HGCWTools {
public static class HgCw001 {
public static List<HGCW001> checkList(Map paramMap) {
AssertUtils.isEmpty(paramMap, "数据检查参数不能为空");
return DaoBase.getInstance().query("HGCW001.queryCheckList", paramMap);
}
}
public static class HgCw002 { public static class HgCw002 {
public static UserVO getUserCompany() { public static UserVO getUserCompany() {
UserVO userVO = new UserVO(); UserVO userVO = new UserVO();
...@@ -438,6 +445,11 @@ public class HGCWTools { ...@@ -438,6 +445,11 @@ public class HGCWTools {
DaoUtils.update("HGCW012.updateDeductionAmount", HGCW012); DaoUtils.update("HGCW012.updateDeductionAmount", HGCW012);
} }
public static List<HGCW012> checkList(Map paramMap) {
AssertUtils.isEmpty(paramMap, "数据检查参数不能为空");
return DaoBase.getInstance().query("HGCW012.queryCheckList", paramMap);
}
} }
/** /**
...@@ -667,4 +679,20 @@ public class HGCWTools { ...@@ -667,4 +679,20 @@ public class HGCWTools {
} }
} }
public static class HgCw055{
public static void save(List<Map> rows, UserVO userVO) {
// AssertUtils.isNull(contractNumber, "合同号不能为空!");
rows.forEach(row -> {
HGCW055 hgcw055 = new HGCW055();
hgcw055.fromMap(row);
hgcw055.setCompanyCode(userVO.getUsercode());
hgcw055.setCompanyName(userVO.getUsername());
DaoUtils.insert(HGCW055.INSERT, hgcw055);
});
}
}
} }
...@@ -294,4 +294,27 @@ ...@@ -294,4 +294,27 @@
<include refid="orderBy"/> <include refid="orderBy"/>
</select> </select>
<select id="queryCheckList" resultClass="com.baosight.hggp.hg.kc.domain.HGKC001">
SELECT
<include refid="column"/>
FROM ${hggpSchema}.HGKC001
WHERE DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="billDate">
LEFT(DEPOSIT_DATE,6) = #billDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="submitStatus">
SUBMIT_STATUS = #submitStatus#
</isNotEmpty>
<include refid="orderBy"/>
</select>
</sqlMap> </sqlMap>
...@@ -382,4 +382,74 @@ ...@@ -382,4 +382,74 @@
GROUP BY COMPANY_CODE, DEP_CODE, WH_CODE, PROJ_CODE, PART_CODE GROUP BY COMPANY_CODE, DEP_CODE, WH_CODE, PROJ_CODE, PART_CODE
</select> </select>
<select id="queryCheckList" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.kc.domain.HGKC003">
SELECT
ID as "id",
QUALITY_ID as "qualityId",<!-- 质检单明细ID -->
RECTIFICATION_ID as "rectificationId",<!-- 整改通知单ID -->
PART_SPEC_ID as "partSpecId",<!-- 零件规格ID -->
PART_COEFFICIENT as "partCoefficient",<!-- 零件系数 -->
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 记录创建者 -->
CREATED_NAME as "createdName", <!-- 记录创建名称 -->
CREATED_TIME as "createdTime", <!-- 记录创建时间 -->
UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DELETE_FLAG as "deleteFlag", <!-- 0-未删除,1-已删除 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
DEPOSIT_DATE as "depositDate", <!-- 入库日期 -->
DEPOSIT_NO as "depositNo", <!-- 入库单号 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 -->
INV_QTY as "invQty", <!-- 数量 -->
INV_UNIT_WEIGHT as "invUnitWeight", <!-- 单重 -->
INV_WEIGHT as "invWeight", <!-- 重量 -->
DEPOSIT_NO_OLD as "depositNoOld", <!-- 入库单号(旧) -->
REMARK as "remark", <!-- 备注 -->
FACTORY_CODE as "factoryCode", <!-- 工厂代码 -->
PROD_ORDER_NO as "prodOrderNo", <!-- 生产订单号 -->
PROD_TASK_NO as "prodTaskNo", <!-- 生产任务号 -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
PRDT_TYPE as "prdtType", <!-- 产品类型 -->
PRDT_CODE as "prdtCode", <!-- 产品编码 -->
PRDT_NAME as "prdtName", <!-- 产品名称 -->
PRDT_LENGTH as "prdtLength", <!-- 产品-长 -->
PRDT_WIDTH as "prdtWidth", <!-- 产品-宽 -->
PRDT_THICK as "prdtThick", <!-- 产品-厚 -->
PRDT_SPEC as "prdtSpec", <!-- 产品规格 -->
PART_TYPE as "partType", <!-- 零件类型 -->
PART_CODE as "partCode", <!-- 零件编码 -->
PART_NAME as "partName", <!-- 零件名称 -->
PART_LENGTH as "partLength", <!-- 零件-长 -->
PART_WIDTH as "partWidth", <!-- 零件-宽 -->
PART_THICK as "partThick", <!-- 零件-厚 -->
PART_SPEC as "partSpec", <!-- 零件规格 -->
PRICE as "price", <!-- 单价 -->
AMOUNT as "amount", <!-- 金额 -->
STORAGE_TYPE as "storageType", <!-- 入库类型:1:入库 2:退回 -->
IS_RETURN as "isReturn", <!-- 是否退回:0:否 1:是 -->
SUBMIT_STATUS as "submitStatus" <!-- 提交状态 -->
FROM ${hggpSchema}.HGKC003 WHERE 1=1 AND DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="billDate">
LEFT(DEPOSIT_DATE,6) = #billDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="submitStatus">
SUBMIT_STATUS = #submitStatus#
</isNotEmpty>
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID desc
</isEmpty>
</dynamic>
</select>
</sqlMap> </sqlMap>
...@@ -290,4 +290,24 @@ ...@@ -290,4 +290,24 @@
</dynamic> </dynamic>
</select> </select>
<select id="queryCheckList" parameterClass="HashMap" resultClass="HGKC004">
SELECT
<include refid="column"/>
FROM ${hggpSchema}.HGKC004 WHERE 1=1
<isNotEmpty prepend=" AND " property="billDate">
LEFT(RECEIPT_DATE,6) = #billDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="submitStatus">
STATUS = #submitStatus#
</isNotEmpty>
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
RECEIPT_DATE DESC,CREATED_TIME DESC
</isEmpty>
</dynamic>
</select>
</sqlMap> </sqlMap>
...@@ -534,4 +534,64 @@ ...@@ -534,4 +534,64 @@
</select> </select>
<select id="queryCheckList" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.kc.domain.HGKC006">
SELECT
ID as "id",
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 记录创建者 -->
CREATED_NAME as "createdName", <!-- 记录创建名称 -->
CREATED_TIME as "createdTime", <!-- 记录创建时间 -->
UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DELETE_FLAG as "deleteFlag", <!-- 0-未删除,1-已删除 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
OTHER_ENTER_DATE as "otherEnterDate", <!-- 其他入库日期 -->
OTHER_ENTER_NO as "otherEnterNo", <!-- 其他入库单号 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 -->
OTHER_ENTER_NO_OLD as "otherEnterNoOld", <!-- 其他入库单号(旧) -->
REMARK as "remark", <!-- 备注 -->
FACTORY_CODE as "factoryCode", <!-- 工厂代码 -->
PROD_ORDER_NO as "prodOrderNo", <!-- 生产订单号 -->
PROD_TASK_NO as "prodTaskNo", <!-- 生产任务号 -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
PRDT_TYPE as "prdtType", <!-- 产品类型 -->
PRDT_CODE as "prdtCode", <!-- 产品编码 -->
PRDT_NAME as "prdtName", <!-- 产品名称 -->
PRDT_LENGTH as "prdtLength", <!-- 产品-长 -->
PRDT_WIDTH as "prdtWidth", <!-- 产品-宽 -->
PRDT_THICK as "prdtThick", <!-- 产品-厚 -->
PRDT_SPEC as "prdtSpec", <!-- 产品规格 -->
PART_TYPE as "partType", <!-- 零件类型 -->
PART_CODE as "partCode", <!-- 零件编码 -->
PART_NAME as "partName", <!-- 零件名称 -->
PART_LENGTH as "partLength", <!-- 零件-长 -->
PART_WIDTH as "partWidth", <!-- 零件-宽 -->
PART_THICK as "partThick", <!-- 零件-厚 -->
PART_SPEC as "partSpec", <!-- 零件规格 -->
SUBMIT_STATUS as "submitStatus", <!-- 提交状态 -->
SOURCE as "source" <!-- 数据来源 -->
FROM ${hggpSchema}.HGKC006 WHERE 1=1 and DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="billDate">
LEFT(OTHER_ENTER_DATE,6) = #billDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="submitStatus">
SUBMIT_STATUS = #submitStatus#
</isNotEmpty>
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
CREATED_TIME desc
</isEmpty>
</dynamic>
</select>
</sqlMap> </sqlMap>
...@@ -532,4 +532,65 @@ ...@@ -532,4 +532,65 @@
</select> </select>
<select id="queryCheckList" parameterClass="java.util.HashMap"
resultClass="com.baosight.hggp.hg.kc.domain.HGKC007">
SELECT
ID as "id",
ACCOUNT_CODE as "accountCode", <!-- 企业编码 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 记录创建者 -->
CREATED_NAME as "createdName", <!-- 记录创建名称 -->
CREATED_TIME as "createdTime", <!-- 记录创建时间 -->
UPDATED_BY as "updatedBy", <!-- 记录修改者 -->
UPDATED_NAME as "updatedName", <!-- 记录修改名称 -->
UPDATED_TIME as "updatedTime", <!-- 记录修改时间 -->
DELETE_FLAG as "deleteFlag", <!-- 0-未删除,1-已删除 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
OTHER_OUT_DATE as "otherOutDate", <!-- 其他出库日期 -->
OTHER_OUT_NO as "otherOutNo", <!-- 其他出库单号 -->
WH_CODE as "whCode", <!-- 仓库编码 -->
WH_NAME as "whName", <!-- 仓库名称 -->
OTHER_OUT_NO_OLD as "otherOutNoOld", <!-- 其他出库单号(旧) -->
REMARK as "remark", <!-- 备注 -->
FACTORY_CODE as "factoryCode", <!-- 工厂代码 -->
PROD_ORDER_NO as "prodOrderNo", <!-- 生产订单号 -->
PROD_TASK_NO as "prodTaskNo", <!-- 生产任务号 -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
PRDT_TYPE as "prdtType", <!-- 产品类型 -->
PRDT_CODE as "prdtCode", <!-- 产品编码 -->
PRDT_NAME as "prdtName", <!-- 产品名称 -->
PRDT_LENGTH as "prdtLength", <!-- 产品-长 -->
PRDT_WIDTH as "prdtWidth", <!-- 产品-宽 -->
PRDT_THICK as "prdtThick", <!-- 产品-厚 -->
PRDT_SPEC as "prdtSpec", <!-- 产品规格 -->
PART_TYPE as "partType", <!-- 零件类型 -->
PART_CODE as "partCode", <!-- 零件编码 -->
PART_NAME as "partName", <!-- 零件名称 -->
PART_LENGTH as "partLength", <!-- 零件-长 -->
PART_WIDTH as "partWidth", <!-- 零件-宽 -->
PART_THICK as "partThick", <!-- 零件-厚 -->
PART_SPEC as "partSpec", <!-- 零件规格 -->
SUBMIT_STATUS as "submitStatus", <!-- 提交状态 -->
SOURCE as "source" <!-- 数据来源 -->
FROM ${hggpSchema}.HGKC007 WHERE 1=1 and DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="billDate">
LEFT(OTHER_OUT_DATE,6) = #billDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="submitStatus">
SUBMIT_STATUS = #submitStatus#
</isNotEmpty>
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
CREATED_TIME desc
</isEmpty>
</dynamic>
</select>
</sqlMap> </sqlMap>
...@@ -188,4 +188,44 @@ ...@@ -188,4 +188,44 @@
WHERE WHERE
ID = #id# ID = #id#
</update> </update>
<select id="queryCheckList" resultClass="com.baosight.hggp.hg.kc.domain.HGKC008">
SELECT
ID as "id", <!-- 主键id -->
ACCOUNT_CODE as "accountCode", <!-- 账套 -->
DEP_CODE as "depCode", <!-- 部门编码 -->
CREATED_BY as "createdBy", <!-- 创建人 -->
CREATED_NAME as "createdName", <!-- 创建人名称 -->
CREATED_TIME as "createdTime", <!-- 创建时间 -->
UPDATED_BY as "updatedBy", <!-- 修改人 -->
UPDATED_NAME as "updatedName", <!-- 修改人名称 -->
UPDATED_TIME as "updatedTime", <!-- 修改时间 -->
DELETE_FLAG as "deleteFlag", <!-- 是否删除 0-否1-是 -->
COMPANY_CODE as "companyCode", <!-- 公司编码 -->
COMPANY_NAME as "companyName", <!-- 公司名称 -->
RECEIPT_DATE as "receiptDate", <!-- 单据日期 -->
APPLY_CODE as "applyCode", <!-- 申请单号 -->
WH_CODE as "whCode", <!-- 仓库编号 -->
WH_NAME as "whName", <!-- 仓库名称 -->
STATUS as "status", <!-- 状态 0未提交,1已提交 -->
PROJ_CODE as "projCode", <!-- 项目编码 -->
PROJ_NAME as "projName", <!-- 项目名称 -->
RECEIVE_TYPE as "receiveType" <!-- 领料单类型 0:正常,1:退库 -->
FROM ${hggpSchema}.HGKC008 WHERE 1=1
<isNotEmpty prepend=" AND " property="billDate">
LEFT(RECEIPT_DATE,6) = #billDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="submitStatus">
STATUS = #submitStatus#
</isNotEmpty>
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID desc
</isEmpty>
</dynamic>
</select>
</sqlMap> </sqlMap>
...@@ -129,6 +129,16 @@ public class HGKCTools { ...@@ -129,6 +129,16 @@ public class HGKCTools {
// HGCGTools.HgCg003.updateStatus(receiveNo, HGConstant.CgReceiveStatus.S_5); // HGCGTools.HgCg003.updateStatus(receiveNo, HGConstant.CgReceiveStatus.S_5);
} }
/**
* 查询
* 成本核算数据检查
* @param paramMap
* @return
*/
public static List<HGKC001> checkList(Map paramMap) {
AssertUtils.isEmpty(paramMap, "入库时间不能为空");
return DaoBase.getInstance().query("HGKC001.queryCheckList", paramMap);
}
} }
/** /**
...@@ -391,6 +401,17 @@ public class HGKCTools { ...@@ -391,6 +401,17 @@ public class HGKCTools {
List<HGKC003> results = list(depositNos); List<HGKC003> results = list(depositNos);
return results.stream().collect(Collectors.toMap(HGKC003::getDepositNo, item -> item)); return results.stream().collect(Collectors.toMap(HGKC003::getDepositNo, item -> item));
} }
/**
* 查询
* 成本核算数据检查
* @param paramMap
* @return
*/
public static List<HGKC003> checkList(Map paramMap) {
AssertUtils.isEmpty(paramMap, "时间不能为空");
return DaoBase.getInstance().query("HGKC003.queryCheckList", paramMap);
}
} }
/** /**
...@@ -531,6 +552,17 @@ public class HGKCTools { ...@@ -531,6 +552,17 @@ public class HGKCTools {
queryMap.put("ids", ids); queryMap.put("ids", ids);
DaoUtils.update(HGSqlConstant.HGKC004.UPDATE_PRINT, queryMap); DaoUtils.update(HGSqlConstant.HGKC004.UPDATE_PRINT, queryMap);
} }
/**
* 查询
* 成本核算数据检查
* @param paramMap
* @return
*/
public static List<HGKC004> checkList(Map paramMap) {
AssertUtils.isEmpty(paramMap, "时间不能为空");
return DaoBase.getInstance().query("HGKC004.queryCheckList", paramMap);
}
} }
/** /**
...@@ -657,6 +689,17 @@ public class HGKCTools { ...@@ -657,6 +689,17 @@ public class HGKCTools {
HGKC006 result = (HGKC006) DaoBase.getInstance().get(HGKC006.QUERY, HGKC006.FIELD_ID, id); HGKC006 result = (HGKC006) DaoBase.getInstance().get(HGKC006.QUERY, HGKC006.FIELD_ID, id);
return result; return result;
} }
/**
* 查询
* 成本核算数据检查
* @param paramMap
* @return
*/
public static List<HGKC006> checkList(Map paramMap) {
AssertUtils.isEmpty(paramMap, "时间不能为空");
return DaoBase.getInstance().query("HGKC006.queryCheckList", paramMap);
}
} }
public static class HgKc006A { public static class HgKc006A {
...@@ -675,6 +718,17 @@ public class HGKCTools { ...@@ -675,6 +718,17 @@ public class HGKCTools {
HGKC007 result = (HGKC007) DaoBase.getInstance().get(HGKC007.QUERY, HGKC007.FIELD_ID, id); HGKC007 result = (HGKC007) DaoBase.getInstance().get(HGKC007.QUERY, HGKC007.FIELD_ID, id);
return result; return result;
} }
/**
* 查询
* 成本核算数据检查
* @param paramMap
* @return
*/
public static List<HGKC007> checkList(Map paramMap) {
AssertUtils.isEmpty(paramMap, "时间不能为空");
return DaoBase.getInstance().query("HGKC007.queryCheckList", paramMap);
}
} }
public static class HgKc007A { public static class HgKc007A {
...@@ -684,7 +738,6 @@ public class HGKCTools { ...@@ -684,7 +738,6 @@ public class HGKCTools {
List<HGKC007A> results = DaoBase.getInstance().query(HGKC007A.QUERY, paramMap); List<HGKC007A> results = DaoBase.getInstance().query(HGKC007A.QUERY, paramMap);
return results; return results;
} }
} }
...@@ -695,6 +748,17 @@ public class HGKCTools { ...@@ -695,6 +748,17 @@ public class HGKCTools {
return result; return result;
} }
/**
* 查询
* 成本核算数据检查
* @param paramMap
* @return
*/
public static List<HGKC008> checkList(Map paramMap) {
AssertUtils.isEmpty(paramMap, "时间不能为空");
return DaoBase.getInstance().query("HGKC008.queryCheckList", paramMap);
}
} }
public static class HgKc008A { public static class HgKc008A {
......
...@@ -126,6 +126,38 @@ $(function() { ...@@ -126,6 +126,38 @@ $(function() {
IPLAT.EFPopupInput.text( $("#popupInputPartyA") , partyA) IPLAT.EFPopupInput.text( $("#popupInputPartyA") , partyA)
e.preventDefault(); // 不使用默认的回填逻辑 e.preventDefault(); // 不使用默认的回填逻辑
} }
},"popupInputPartyB": {
/**
* EFGrid 查询时触发的事件,通常在此处,设置查询条件
* 注意: 必须返回一个EiInfo,作为初始查询条件
* 配置了query时,默认每次打开窗口都会进行一次查询
*/
query: function (e) {
console.log("Step" + (++i) + ": ----query----");
// 将自定义div中的字段构造成查询条件 EiInfo
// var queryInfo = EiInfo.build("#result-0-contractCategory");
var info = new EiInfo();
return info;
},
/**
* grid中的数据回填时触发的事件
* @param e 回填数据事件
* e.sender 弹出窗口对象
* e.grid 弹出的grid对象
* e.model 选中的数据行model
*/
backFill: function (e) {
console.log("Step" + (++i) + ": ----backFill----");
// 回填数据
var model = e.model;
// var data = model.toJSON();
console.log(model);
var partyB = model.usercode + "-" + model.username;
$("#result-0-partyB").val(partyB);
IPLAT.EFPopupInput.text( $("#popupInputPartyB") , partyB)
e.preventDefault(); // 不使用默认的回填逻辑
}
} }
}; };
......
...@@ -31,7 +31,17 @@ ...@@ -31,7 +31,17 @@
resizable="true" popupTitle="甲方名称" popupWidth="400"> resizable="true" popupTitle="甲方名称" popupWidth="400">
</EF:EFPopupInput> </EF:EFPopupInput>
<EF:EFInput ename="result-0-partyA" cname="甲方名称" type="hidden" /> <EF:EFInput ename="result-0-partyA" cname="甲方名称" type="hidden" />
<EF:EFInput ename="result-0-partyB" cname="乙方名称" colWidth="4" /> <EF:EFPopupInput ename="popupInputPartyB" cname="乙方名称" colWidth="4"
serviceName="HGCW006A" methodName="partyBQuery"
resultId="partyAResult"
save="false" popupType="ServiceGrid"
valueField="username" textField="username"
columnEnames="username,usercode"
columnCnames="名称,编码"
readonly="true"
resizable="true" popupTitle="乙方名称" popupWidth="400">
</EF:EFPopupInput>
<EF:EFInput ename="result-0-partyB" cname="乙方名称" type="hidden"/>
</div> </div>
<div class="row"> <div class="row">
......
...@@ -25,7 +25,7 @@ $(function() { ...@@ -25,7 +25,7 @@ $(function() {
], ],
loadComplete: function (grid) { loadComplete: function (grid) {
$("#SELECT_BILL").on("click",addFunc); $("#SELECT_BILL").on("click",addFunc);
$("#BTN_UPDATE").on("click",updateFunc); $("#SAVE").on("click",saveFunc);
$("#SUBMIT").on("click",submitFunc); $("#SUBMIT").on("click",submitFunc);
$("#BTN_BILL").on("click",billFunc); $("#BTN_BILL").on("click",billFunc);
...@@ -74,25 +74,55 @@ function addFunc() { ...@@ -74,25 +74,55 @@ function addFunc() {
} }
/** /**
* 修改 * 保存
*/ */
function updateFunc() { function saveFunc() {
let rows = resultGrid.getCheckedRows(); let rows = resultGrid.getCheckedRows();
if (rows.length != 1) { if (rows.length < 1) {
message("请选择一条数据"); message("请选择数据");
return; return;
} }
if (rows[0].reviewStatus == "3") { let flag = true;
message("已经审核的单据不能修改"); $.each(rows, function(index, item) {
return; let reviewStatus= item.get("reviewStatus");
} if((reviewStatus === "1")){
JSColorbox.open({ message("数据已审核");
href: "HGCW010B?methodName=initLoad&inqu_status-0-mainId=" + rows[0].id + "&efParentFormEname=HGCW010", flag = false;
title: "<div style='text-align: center;'>开票清单</div>", return false;
width: "90%", }
height: "90%",
callbackName: windowCallback
}); });
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
var info = new EiInfo();
info.addBlock(JSUtils.checkedRows2Block("result"));
EiCommunicator.send("HGCW010", "save", info, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
try {
query();
} catch (e) {
// TODO: handle exception
}
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
});
//JSUtils.submitGridsData("result", "HPSC001", "save", true);
}
});
}
} }
...@@ -103,9 +133,18 @@ function windowCallback() { ...@@ -103,9 +133,18 @@ function windowCallback() {
JSColorbox.close(); JSColorbox.close();
} }
function contractDetailFunc(id) { function contractDetailFunc(id) {
let rows = resultGrid.getCheckedRows();
if (rows.length != 1) {
message("请选择一条数据");
return;
}
if (rows[0].reviewStatus == "3") {
message("已经审核的单据不能修改");
return;
}
JSColorbox.open({ JSColorbox.open({
href: "HGCW010C?methodName=initLoad&inqu_status-0-mainId=" + id + "&efParentFormEname=HGCW010", href: "HGCW010B?methodName=initLoad&inqu_status-0-mainId=" + rows[0].id + "&efParentFormEname=HGCW010",
title: "<div style='text-align: center;'>开票清单</div>", title: "<div style='text-align: center;'>开票清单</div>",
width: "90%", width: "90%",
height: "90%", height: "90%",
......
...@@ -37,7 +37,10 @@ ...@@ -37,7 +37,10 @@
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="signingDate" cname="开票日期" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="signingDate" cname="开票日期" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="billNumber" cname="发票号" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="billNumber" cname="发票号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="taxPoints" cname="税率" width="120" enable="false" readonly="true" align="center"/> <EF:EFComboColumn ename="taxPoints" cname="税点" width="120" align="center" required="true"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="true" >
<EF:EFCodeOption codeName="hggp.cw.taxPoints"/>
</EF:EFComboColumn>
<EF:EFColumn ename="thisSettlementAmount" cname="不含税金额" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="thisSettlementAmount" cname="不含税金额" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="thisSettlementTax" cname="税额" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="thisSettlementTax" cname="税额" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="totalContractPriceIncluding" cname="开票总额" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="totalContractPriceIncluding" cname="开票总额" width="120" enable="false" readonly="true" align="center"/>
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<EF:EFColumn ename="thisPriceTax" cname="结算价税合计金额" hidden="true"/> <EF:EFColumn ename="thisPriceTax" cname="结算价税合计金额" hidden="true"/>
<EF:EFColumn ename="thisSettlementTax" cname="结算税金" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="thisSettlementTax" cname="结算税金" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="thisSettlementAmount" cname="结算金额" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="thisSettlementAmount" cname="结算金额" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="thisAmount" cname="本次结算金额" width="120" align="center"/> <EF:EFColumn ename="thisAmount" cname="本次开票金额" width="120" align="center"/>
<EF:EFColumn ename="remainingAmount" cname="剩余开票金额" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="remainingAmount" cname="剩余开票金额" width="120" enable="false" readonly="true" align="center"/>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<EF:EFColumn ename="projName" cname="项目名称" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="projName" cname="项目名称" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="partyA" cname="客户名称" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="partyA" cname="客户名称" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="settlementNumber" cname="来源单号" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="settlementNumber" cname="来源单号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="totalContractPriceIncluding" cname="款总额" width="120" format="{0:N3}" align="center"/> <EF:EFColumn ename="totalContractPriceIncluding" cname="款总额" width="120" format="{0:N3}" align="center"/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
</EF:EFPage> </EF:EFPage>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<EF:EFColumn ename="projName" cname="项目名称" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="projName" cname="项目名称" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="partyA" cname="客户名称" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="partyA" cname="客户名称" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="settlementNumber" cname="来源单号" width="120" enable="false" readonly="true" align="center"/> <EF:EFColumn ename="settlementNumber" cname="来源单号" width="120" enable="false" readonly="true" align="center"/>
<EF:EFColumn ename="totalContractPriceIncluding" cname="收款总额" width="120" format="{0:N3}" align="center" enable="false" readonly="true"/> <EF:EFColumn ename="totalContractPriceIncluding" cname="开票总额" width="120" format="{0:N3}" align="center" enable="false" readonly="true"/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
</EF:EFPage> </EF:EFPage>
......
$(function() {
// 查询
$("#QUERY").on("click", function () {
query();
});
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSizes: [10,20,30,50,100,200],
},
columns: [
{
field: "button",
title: "操作",
template: '<input value="数据检查" class="i-btn-sm" type="button" align="center" onclick="openButtonCheck(\'#:id#\')" >' +
'<input value="成本核算" class="i-btn-sm" type="button" align="center" onclick="openButtonCalculate(\'#:id#\')" >'
,
width: 100
}
],
}
});
$(window).load(function () {
// 查
query();
});
/**
* 查询
*/
let query = function () {
resultGrid.dataSource.page(1);
}
/**
* 数据检查
* @param id
*/
let openButtonCheck = function (id) {
let inEiInfo = new EiInfo();
inEiInfo.set("id", id);
JSUtils.confirm("确定进行检查数据吗? ", {
ok: function () {
EiCommunicator.send('HGCW055', 'checkData', inEiInfo, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
let resultCode = ei.extAttr.resultCode;
let resultDesc = ei.extAttr.resultDesc;
message(resultDesc);
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
}
);
}
});
}
/**
* 成本核算
* @param id
*/
let openButtonCalculate = function (id) {
let inEiInfo = new EiInfo();
inEiInfo.set("id", id);
JSUtils.confirm("确定进行成本核算操作吗? ", {
ok: function () {
EiCommunicator.send('HGCW055', 'calculate', inEiInfo, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
let resultCode = ei.extAttr.resultCode;
let resultDesc = ei.extAttr.resultDesc;
message(resultDesc);
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
}
);
}
});
}
<!DOCTYPE html>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="EF" tagdir="/WEB-INF/tags/EF" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<head>
</head>
<EF:EFPage title="账期维护">
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<EF:EFSelect cname="公司名称" blockId="inqu_status" ename="companyCode" row="0" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="roleCompany" textField="companyName" valueField="companyCode"/>
</EF:EFSelect>
<EF:EFDatePicker cname="核算年月" blockId="inqu_status" ename="yearMonth" row="0" colWidth="3"
format="yyyy-MM" parseFormats="['yyyyMM']" start="year" depth="year"/>
<EF:EFSelect cname="核算状态" ename="inqu_status-0-checkStatus" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.cw.checkStatus"/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="no" isFloat="true" autoBind="false">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="button" cname="操作" width="120" enable="false" align="center"/>
<EF:EFColumn ename="companyName" cname="公司名称" width="150" align="center" required="true"/>
<EF:EFColumn ename="year" cname="核算年度" width="100" align="center" required="true"/>
<EF:EFColumn ename="month" cname="核算月份" width="100" align="center" required="true"/>
<EF:EFComboColumn ename="checkStatus" cname="核算状态" width="100" align="center" required="true"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="false" defaultValue="0">
<EF:EFCodeOption codeName="hggp.cw.checkStatus"/>
</EF:EFComboColumn>
<EF:EFColumn ename="checkName" cname="核算人" width="100" align="center"
required="true"/>
<EF:EFColumn ename="checkBy" cname="核算人" width="100" align="center"
required="true" hidden="true"/>
<EF:EFColumn ename="checkTime" cname="核算时间" enable="false" width="120" editType="datetime"
parseFormats="['yyyyMMddHHmmss','yyyy-MM-dd HH:mm:ss']"
dateFormat="yyyy-MM-dd HH:mm:ss" displayType="datetime" />
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
<script>
var ctx = "${ctx}";
</script>
<script src="${ctx}/HG/CW/HGCW055.js"></script>
\ No newline at end of file
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