first commit

This commit is contained in:
2026-01-16 14:13:44 +08:00
commit 903ff8d495
34603 changed files with 8585054 additions and 0 deletions

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="erp.ERPEquipmentClassMapper" >
<resultMap id="BaseResultMap" type="com.sipai.entity.equipment.EquipmentClass" >
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="name" property="name" jdbcType="VARCHAR" />
<result column="insdt" property="insdt" jdbcType="TIMESTAMP" />
<result column="insuser" property="insuser" jdbcType="VARCHAR" />
<result column="remark" property="remark" jdbcType="VARCHAR" />
<result column="status" property="status" jdbcType="VARCHAR" />
<result column="bizid" property="bizid" jdbcType="VARCHAR" />
<result column="code" property="code" jdbcType="VARCHAR" />
<result column="pid" property="pid" jdbcType="VARCHAR" />
<result column="flag" property="flag" jdbcType="VARCHAR" />
<result column=" interfacetype" property=" interfacetype" jdbcType="VARCHAR" />
</resultMap>
<select id="selectListByWhere" parameterType="java.lang.String" resultMap="BaseResultMap">
select
code as code,
name as name
from pimMESMachineItem
${where}
</select>
</mapper>

View File

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="erp.ERPMaterialBOMMapper">
<resultMap id="BaseResultMap" type="com.sipai.entity.material.MaterialERPBOM" >
<id column="FParentLevel" property="FParentLevel" jdbcType="VARCHAR" />
<result column="FParentID" property="FParentID" jdbcType="VARCHAR" />
<result column="FParentNumber" property="FParentNumber" jdbcType="VARCHAR" />
<result column="FParentName" property="FParentName" jdbcType="VARCHAR" />
<result column="FParentYield" property="FParentYield" jdbcType="VARCHAR" />
<result column="FParentModel" property="FParentModel" jdbcType="VARCHAR" />
<result column="FParentUnit" property="FParentUnit" jdbcType="VARCHAR" />
<result column="FChildLevel" property="FChildLevel" jdbcType="VARCHAR" />
<result column="FChildID" property="FChildID" jdbcType="VARCHAR" />
<result column="FChildNumber" property="FChildNumber" jdbcType="VARCHAR" />
<result column="FChildName" property="FChildName" jdbcType="VARCHAR" />
<result column="FChildModel" property="FChildModel" jdbcType="VARCHAR" />
<result column="FChildErpCls" property="FChildErpCls" jdbcType="VARCHAR" />
<result column="FChildUnit" property="FChildUnit" jdbcType="VARCHAR" />
<result column="FChildFixLeadTime" property="FChildFixLeadTime" jdbcType="VARCHAR" />
<result column="useunit" property="useunit" jdbcType="VARCHAR" />
<result column="needsum" property="needsum" jdbcType="VARCHAR" />
<result column="FChildSecInv" property="FChildSecInv" jdbcType="VARCHAR" />
<result column="rk_td" property="rk_td" jdbcType="VARCHAR" />
<result column="rkbom_statu" property="rkbom_statu" jdbcType="VARCHAR" />
<result column="FBomNumber" property="FBomNumber" jdbcType="VARCHAR" />
</resultMap>
<update id="updaterkbom" parameterType="com.sipai.entity.material.MaterialERPBOM" >
update icbom
set rkbom_statu = 1
where FBomNumber = #{FBomNumber,jdbcType=VARCHAR}
</update>
<select id="selectListERPBOM" parameterType="java.lang.String" resultMap="BaseResultMap">
EXEC rkzzq_boms #{materialcode,jdbcType=VARCHAR}
</select>
</mapper>

View File

@ -0,0 +1,134 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="erp.ERPProdTaskMapper">
<resultMap id="BaseResultMap" type="com.sipai.entity.plan.Prodtask" >
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="taskcode" property="taskcode" jdbcType="VARCHAR" />
<result column="billstatus" property="billstatus" jdbcType="VARCHAR" />
<result column="workshop" property="workshop" jdbcType="VARCHAR" />
<result column="materialcode" property="materialcode" jdbcType="VARCHAR" />
<result column="materialname" property="materialname" jdbcType="VARCHAR" />
<result column="model" property="model" jdbcType="VARCHAR" />
<result column="batch" property="batch" jdbcType="VARCHAR" />
<result column="unit" property="unit" jdbcType="VARCHAR" />
<result column="planamount" property="planamount" jdbcType="DOUBLE" />
<result column="pstdate" property="pstdate" jdbcType="TIMESTAMP" />
<result column="pendate" property="pendate" jdbcType="TIMESTAMP" />
<result column="type" property="type" jdbcType="VARCHAR" />
<result column="bomno" property="bomno" jdbcType="VARCHAR" />
<result column="costobject" property="costobject" jdbcType="VARCHAR" />
<result column="source" property="source" jdbcType="VARCHAR" />
<result column="planno" property="planno" jdbcType="VARCHAR" />
<result column="salesno" property="salesno" jdbcType="VARCHAR" />
<result column="procompany" property="procompany" jdbcType="VARCHAR" />
<result column="commonunit" property="commonunit" jdbcType="VARCHAR" />
<result column="qualitypart" property="qualitypart" jdbcType="VARCHAR" />
<result column="astdate" property="astdate" jdbcType="TIMESTAMP" />
<result column="aendate" property="aendate" jdbcType="TIMESTAMP" />
<result column="midentification" property="midentification" jdbcType="VARCHAR" />
<result column="runstatus" property="runstatus" jdbcType="VARCHAR" />
<result column="plantype" property="plantype" jdbcType="VARCHAR" />
<result column="bomtype" property="bomtype" jdbcType="VARCHAR" />
<result column="insuser" property="insuser" jdbcType="VARCHAR" />
<result column="insdt" property="insdt" jdbcType="TIMESTAMP" />
<result column="pid" property="pid" jdbcType="VARCHAR" />
<result column="relation" property="relation" jdbcType="VARCHAR" />
</resultMap>
<!-- 查询ERP所有任务单 -->
<select id="selectList" parameterType="java.lang.String" resultMap="BaseResultMap">
SELECT
FAuxQty planamount ,
a.FBillNo taskcode ,
FOrderInterID salesno ,
FBomInterID bomno,
fmodel model,
f.fname costobject,
g.fname procompany,
FMRP source,
FGMPBatchNo batch,
d.fname unit,
FBOMCategory bomtype,
FPlanOrderInterID planno,
FPlanCategory plantype,
FWorkTypeID type,
FPlanCommitDate pstdate ,
FPlanFinishDate pendate ,
b.FNumber materialcode ,
b.FName materialname,
a.FStatus runstatus ,
e.fname workshopname,
FWorkShop workshop
FROM ICMO a INNER JOIN t_icitem b ON b.FItemID = a.FItemID
INNER JOIN t_Measureunit d ON d.fitemid=a.funitid
left JOIN cbCostObj f ON f.FItemID=a.FCostObjID
left JOIN t_department e ON e.fitemid=a.Fworkshop
left JOIN t_Supplier g ON g.FItemID=a.FSupplyID
WHERE FCancellation=0 --未作废
AND FMrpClosed=0
AND FClosed=0 --未关闭
AND FPlanConfirmed=1 --已计划确认
AND ( a.FStatus=1 OR a.FStatus =2 )--已确认/已下达
AND ( FTranType=85
OR FTranType=571
) --生产任务单/委外任务单
AND FPlanCategory=1 --增加计划类别为STD lgq
</select>
<!-- 查询带条件ERP所有任务单 -->
<select id="selectListByWhere" parameterType="java.lang.String" resultMap="BaseResultMap">
SELECT
FAuxQty planamount ,
a.FBillNo taskcode ,
FOrderInterID salesno ,
FBomInterID bomno,
fmodel model,
f.fname costobject,
g.fname procompany,
FMRP source,
FGMPBatchNo batch,
d.fname unit,
FBOMCategory bomtype,
FPlanOrderInterID planno,
FPlanCategory plantype,
FWorkTypeID type,
FPlanCommitDate pstdate ,
FPlanFinishDate pendate ,
b.FNumber materialcode ,
b.FName materialname,
a.FStatus runstatus ,
e.fname workshopname,
FWorkShop workshop
FROM ICMO a INNER JOIN t_icitem b ON b.FItemID = a.FItemID
INNER JOIN t_Measureunit d ON d.fitemid=a.funitid
left JOIN cbCostObj f ON f.FItemID=a.FCostObjID
left JOIN t_department e ON e.fitemid=a.Fworkshop
left JOIN t_Supplier g ON g.FItemID=a.FSupplyID
WHERE FCancellation=0 --未作废
AND FMrpClosed=0
AND FClosed=0 --未关闭
AND FPlanConfirmed=1 --已计划确认
AND ( a.FStatus=1 OR a.FStatus =2 )--已确认/已下达
AND ( FTranType=85
OR FTranType=571
) --生产任务单/委外任务单
AND FPlanCategory=1 --增加计划类别为STD lgq
${where}
</select>
<!-- 标记任务已同步 -->
<update id="updateTasks" parameterMap="updateTasksMap" >
update ICMO
set rkbom_statu = 1
where FBillNo = #{taskcode,jdbcType=VARCHAR}
</update>
<update id="updateTasksByWhere" parameterType="hashmap" >
update ICMO
set rkbom_statu = 1
${where}
</update>
<parameterMap type="java.util.Map" id="updateTasksMap">
<parameter property="taskcode" mode="IN" jdbcType="VARCHAR"/>
</parameterMap>
</mapper>

View File

@ -0,0 +1,119 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="erp.ERPTaskModelMapper">
<resultMap id="TasksMap" type="com.sipai.entity.process.ProcessTechnics" >
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="modelid" jdbcType="VARCHAR" property="modelid" />
<result column="processid" jdbcType="VARCHAR" property="processid" />
<result column="insdt" jdbcType="TIMESTAMP" property="insdt" />
<result column="insuser" jdbcType="VARCHAR" property="insuser" />
<result column="MainProcedure" jdbcType="VARCHAR" property="mainprocedure" />
<result column="MainProcedureCode" jdbcType="VARCHAR" property="mainprocedurecode" />
<result column="SubProcedure" jdbcType="VARCHAR" property="subprocedure" />
<result column="SubProcedureCode" jdbcType="VARCHAR" property="subprocedurecode" />
<result column="ContentNO" jdbcType="VARCHAR" property="contentno" />
<result column="Subject" jdbcType="VARCHAR" property="subject" />
<result column="Specifications" jdbcType="VARCHAR" property="specifications" />
<result column="Mode" jdbcType="VARCHAR" property="mode" />
<result column="Tool" jdbcType="VARCHAR" property="tool" />
<result column="Frequency" jdbcType="VARCHAR" property="frequency" />
<result column="People" jdbcType="VARCHAR" property="people" />
<result column="Rejects" jdbcType="VARCHAR" property="rejects" />
<result column="FileName" jdbcType="VARCHAR" property="filename" />
<result column="FileId" jdbcType="VARCHAR" property="fileid" />
<result column="FormName" jdbcType="VARCHAR" property="formname" />
<result column="FormId" jdbcType="VARCHAR" property="formid" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
</resultMap>
<!-- 根据产品code查询流程任务-->
<select id="selectListByMastrCode" parameterType="java.lang.String" resultMap="TasksMap">
select
gxfl as mainprocedurecode,
gxmc+Case When ISNULL(gygc,'') ='' Then '' Else '-'+gygc End as mainprocedure,
case when cast (jczs as float) >0 then cast (jczs as float)/100
when cast (jczs as float) =0 then 1
else cast (jczs as float) end yield,
itemno as ContentNO,
gyjy as Mode,
bz as Specifications
from pimXTCAPPPBOMItem
where bitemid in
(select MAX(bitemid) from pimXTCAPPPBOMItem
where lbjth=#{code,jdbcType=VARCHAR} group by ItemNo)
order by ItemNo
</select>
<resultMap id="MasterMap" type="com.sipai.entity.material.MaterialInfo" >
<result column="materialcode" property="materialcode" jdbcType="VARCHAR" />
<result column="materialname" property="materialname" jdbcType="VARCHAR" />
<result column="materialmodel" property="materialmodel" jdbcType="VARCHAR" />
<result column="insdt" property="insdt" jdbcType="TIMESTAMP" />
</resultMap>
<!-- 获取产品列表-->
<select id="selectProductListByWhere" parameterType="java.lang.String" resultMap="MasterMap">
select
PartCode as materialcode,
PartName as materialname,
PartStand as materialmodel,
Create_On as insdt
from pimPartMaster
${where}
and partcode = productcode
order by Create_On desc
<!-- SELECT c.FNumber as materialcode,
c.FName as materialname,
c.fmodel as materialmodel
from t_ICItem c where c.FItemID in (
SELECT max(c.FItemID) FROM SEOrder a INNER JOIN dbo.SEOrderEntry b ON b.FInterID = a.FInterID
INNER JOIN dbo.t_ICItem c ON c.FItemID = b.FItemID
where b.FMrpClosed=0 AND b.FQty-ISNULL(b.FStockQty,0)>0
group by c.FNumber
) ${where} -->
<!-- SELECT distinct top 100 percent c.*,a.FFetchDate FROM SEOrder a INNER JOIN dbo.SEOrderEntry b ON b.FInterID = a.FInterID
INNER JOIN dbo.t_ICItem c ON c.FItemID = b.FItemID
WHERE b.FMrpClosed=0 AND b.FQty-ISNULL(b.FStockQty,0)>0
${where}
order by a.FFetchDate asc -->
</select>
<resultMap id="ProcessConfigMap" type="com.sipai.entity.process.ProcessConfig" >
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="insdt" property="insdt" jdbcType="TIMESTAMP" />
<result column="insuser" property="insuser" jdbcType="VARCHAR" />
<result column="materialCode" property="materialcode" jdbcType="VARCHAR" />
<result column="processId" property="processid" jdbcType="VARCHAR" />
<result column="procedureNo" property="procedureno" jdbcType="VARCHAR" />
<result column="yield" property="yield" jdbcType="DOUBLE" />
</resultMap>
<!-- 获取产品工序物料对应关系-->
<select id="selectProcessConfigByCode" parameterType="java.lang.String" resultMap="ProcessConfigMap">
select b.materialcode,b.procedureno ,
case when b.yield >0 then b.yield/100
when b.yield =0 then 1
else b.yield end yield
from (
select wxcc as materialcode, gxfl as procedureno,
CAST ( REPLACE(jczs ,'%','') as float ) as yield
from pimXTCAPPPBOMItem where lbjth=#{code,jdbcType=VARCHAR} ) b
</select>
<resultMap id="ProcessConfig_EMMap" type="com.sipai.entity.process.ProcessConfig_EM" >
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="insdt" jdbcType="TIMESTAMP" property="insdt" />
<result column="insuser" jdbcType="VARCHAR" property="insuser" />
<result column="equipmentClassCode" jdbcType="VARCHAR" property="equipmentclasscode" />
<result column="processId" jdbcType="VARCHAR" property="processid" />
<result column="procedureNo" jdbcType="VARCHAR" property="procedureno" />
<result column="capacity" jdbcType="VARCHAR" property="capacity" />
</resultMap>
<!-- 获取产品工序物料对应关系-->
<select id="selectProcessConfig_EMByCode" parameterType="java.lang.String" resultMap="ProcessConfig_EMMap">
select
gxfl as procedureno,
tdclmc as equipmentClassCode,
Other5 as capacity
from pimXTCAPPPBOMItem
where lbjth=#{code,jdbcType=VARCHAR}
</select>
</mapper>

View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="erp.ERPTaskProcedureMapper">
<resultMap id="BaseResultMap" type="com.sipai.entity.process.TaskProcedure">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="insuser" jdbcType="VARCHAR" property="insuser" />
<result column="insdt" jdbcType="TIMESTAMP" property="insdt" />
<result column="procedurecode" jdbcType="VARCHAR" property="procedurecode" />
<result column="procedurename" jdbcType="VARCHAR" property="procedurename" />
<result column="workstation" jdbcType="VARCHAR" property="workstation" />
<result column="keywords" jdbcType="VARCHAR" property="keywords" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="semiflag" jdbcType="VARCHAR" property="semiflag" />
</resultMap>
<select id="selectListByWhere" parameterType="java.lang.String" resultMap="BaseResultMap">
select
gxfl as procedurecode,
gxmc as procedurename
from pimPRMProcessItem
${where}
</select>
</mapper>

View File

@ -0,0 +1,70 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="erp.ERPinventoryMapper">
<resultMap id="BaseResultMap" type="com.sipai.entity.material.MaterialBOM" >
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="materialcode" property="materialcode" jdbcType="VARCHAR" />
<result column="materialname" property="materialname" jdbcType="VARCHAR" />
<result column="materialmodel" property="materialmodel" jdbcType="VARCHAR" />
<result column="materialproperties" property="materialproperties" jdbcType="VARCHAR" />
<result column="secondaryattribute" property="secondaryattribute" jdbcType="VARCHAR" />
<result column="unit" property="unit" jdbcType="VARCHAR" />
<result column="num" property="num" jdbcType="VARCHAR" />
<result column="yield" property="yield" jdbcType="VARCHAR" />
<result column="state" property="state" jdbcType="VARCHAR" />
<result column="audit" property="audit" jdbcType="VARCHAR" />
<result column="version" property="version" jdbcType="VARCHAR" />
<result column="drawnum" property="drawnum" jdbcType="VARCHAR" />
<result column="processlinecode" property="processlinecode" jdbcType="VARCHAR" />
<result column="processlinename" property="processlinename" jdbcType="VARCHAR" />
<result column="insuser" property="insuser" jdbcType="VARCHAR" />
<result column="insdt" property="insdt" jdbcType="TIMESTAMP" />
<result column="lastinsuser" property="lastinsuser" jdbcType="VARCHAR" />
<result column="lastinsdt" property="lastinsdt" jdbcType="TIMESTAMP" />
<result column="usepeople" property="usepeople" jdbcType="VARCHAR" />
<result column="userdt" property="userdt" jdbcType="TIMESTAMP" />
<result column="remark" property="remark" jdbcType="VARCHAR" />
<result column="jumplayer" property="jumplayer" jdbcType="VARCHAR" />
<result column="levels" property="levels" jdbcType="VARCHAR" />
<result column="unituse" property="unituse" jdbcType="VARCHAR" />
<result column="dosage" property="dosage" jdbcType="VARCHAR" />
<result column="usualuseunit" property="usualuseunit" jdbcType="VARCHAR" />
<result column="plannedpercentage" property="plannedpercentage" jdbcType="VARCHAR" />
<result column="wearrate" property="wearrate" jdbcType="VARCHAR" />
<result column="itemtype" property="itemtype" jdbcType="VARCHAR" />
<result column="operationnumber" property="operationnumber" jdbcType="VARCHAR" />
<result column="process" property="process" jdbcType="VARCHAR" />
<result column="station" property="station" jdbcType="VARCHAR" />
<result column="localnum" property="localnum" jdbcType="VARCHAR" />
<result column="billetsize" property="billetsize" jdbcType="VARCHAR" />
<result column="billetnum" property="billetnum" jdbcType="VARCHAR" />
<result column="warehouse" property="warehouse" jdbcType="VARCHAR" />
<result column="keysymbol" property="keysymbol" jdbcType="VARCHAR" />
<result column="usestate" property="usestate" jdbcType="VARCHAR" />
<result column="ifdown" property="ifdown" jdbcType="VARCHAR" />
<result column="remark1" property="remark1" jdbcType="VARCHAR" />
<result column="remark2" property="remark2" jdbcType="VARCHAR" />
<result column="inventory" property="inventory" jdbcType="VARCHAR" />
<result column="ifpour" property="ifpour" jdbcType="VARCHAR" />
<result column="havereplace" property="havereplace" jdbcType="VARCHAR" />
<result column="faildt" property="faildt" jdbcType="TIMESTAMP" />
<result column="effectdt" property="effectdt" jdbcType="TIMESTAMP" />
<result column="pid" property="pid" jdbcType="VARCHAR" />
<result column="usuallyunit" property="usuallyunit" jdbcType="VARCHAR" />
</resultMap>
<select id="selectListByWhere" parameterType="java.lang.String" resultMap="BaseResultMap">
select
物料代码 materialcode,
物料名称 materialname,
规格 materialmodel,
仓库代码 inventory,
仓库名称 warehouse,
库存 num,
单位 unit
from rkzzq_stock
${where}
</select>
</mapper>