parent
7bcde88b8f
commit
6ed099df61
@ -0,0 +1,120 @@
|
||||
package jnpf.material.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Author: WangChuang
|
||||
* @Date: 2/2/2023 下午3:31
|
||||
* @Description //注释:
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class MaterialMobileEntity extends MaterialEntity {
|
||||
@TableId("ID")
|
||||
private String id;
|
||||
|
||||
@TableField("CREATOR_USER_ID")
|
||||
private String creatoruserid;
|
||||
|
||||
@TableField("CREATOR_USER_NAME")
|
||||
private String creatorusername;
|
||||
|
||||
@TableField("CREATOR_TIME")
|
||||
private Date creatortime;
|
||||
|
||||
@TableField("LAST_MODIFY_USER_ID")
|
||||
private String lastmodifyuserid;
|
||||
|
||||
@TableField("LAST_MODIFY_USER_NAME")
|
||||
private String lastmodifyusername;
|
||||
|
||||
@TableField("LAST_MODIFY_TIME")
|
||||
private Date lastmodifytime;
|
||||
|
||||
@TableField("DELETE_USER_ID")
|
||||
private String deleteuserid;
|
||||
|
||||
@TableField("DELETE_USER_NAME")
|
||||
private String deleteusername;
|
||||
|
||||
@TableField("DELETE_TIME")
|
||||
private Date deletetime;
|
||||
|
||||
@TableField("DELETE_MARK")
|
||||
private String deletemark;
|
||||
|
||||
@TableField("ORGNIZE_ID")
|
||||
private String orgnizeId;
|
||||
|
||||
@TableField("DEPARTMENT_ID")
|
||||
private String departmentId;
|
||||
|
||||
@TableField("M_ID")
|
||||
private String mId;
|
||||
|
||||
@TableField("ITEM_ID")
|
||||
private String itemId;
|
||||
|
||||
@TableField("ITEM_CODE")
|
||||
private String itemCode;
|
||||
|
||||
@TableField("ORGANIZATION_ID")
|
||||
private String organizationId;
|
||||
|
||||
@TableField("ORGANIZATION_CODE")
|
||||
private String organizationCode;
|
||||
|
||||
@TableField("DESCRIPTION")
|
||||
private String description;
|
||||
|
||||
@TableField("PRIMARY_UOM_CODE")
|
||||
private String primaryUomCode;
|
||||
|
||||
@TableField("PRIMARY_UNIT_OF_MEASURE")
|
||||
private String primaryUnitOmeasure;
|
||||
|
||||
@TableField("PURCHASE_FLAG")
|
||||
private String purchaseFlag;
|
||||
|
||||
@TableField("SALES_FLAG")
|
||||
private String salesFlag;
|
||||
|
||||
@TableField("IN_AREA")
|
||||
private String inArea;
|
||||
|
||||
@TableField("OUT_AREA")
|
||||
private String outArea;
|
||||
|
||||
@TableField("EFFECTIVE_STATUS")
|
||||
private String effectiveStatus;
|
||||
|
||||
@TableField("PROCESSING_TYPE")
|
||||
private String processingType;
|
||||
|
||||
@TableField("READ_TAG")
|
||||
private String readTag;
|
||||
|
||||
@TableField("READ_DATE")
|
||||
private Date readDate;
|
||||
|
||||
@TableField("ERROR_MESSAGE")
|
||||
private String errorMessage;
|
||||
// 采购次数
|
||||
private Integer purchasesNumber;
|
||||
// 采购量(吨)
|
||||
private Double purchasesWeight;
|
||||
// 销售次数
|
||||
private Integer salesNumber;
|
||||
// 销售量
|
||||
private Double salesWeight;
|
||||
|
||||
// 转换方法
|
||||
//创建转换方法
|
||||
|
||||
|
||||
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
<?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="jnpf.material.mapper.MaterialMapper">
|
||||
|
||||
|
||||
|
||||
</mapper>
|
@ -0,0 +1,107 @@
|
||||
<?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="jnpf.material.mapper.MaterialMapper">
|
||||
<select id="getMaterialMobileList111" resultType="map">
|
||||
select * from jg_poundlist
|
||||
</select>
|
||||
|
||||
<!--获取派工单信息-->
|
||||
<select id="getMaterialMobileList" resultMap="findWorkOrderByCondition">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
a.id id,
|
||||
a.creator_user_id creator_user_id,
|
||||
a.creator_user_name creator_user_name,
|
||||
a.creator_time creator_time,
|
||||
a.last_modify_user_id last_modify_user_id,
|
||||
a.last_modify_user_name last_modify_user_name,
|
||||
a.last_modify_time last_modify_time,
|
||||
a.delete_user_id delete_user_id,
|
||||
a.delete_user_name delete_user_name,
|
||||
a.delete_time delete_time,
|
||||
a.delete_mark delete_mark,
|
||||
a.orgnize_id orgnize_id,
|
||||
a.department_id department_id,
|
||||
a.m_id m_id,
|
||||
a.item_id item_id,
|
||||
a.item_code item_code,
|
||||
a.organization_id organization_id,
|
||||
a.organization_code organization_code,
|
||||
a.description description,
|
||||
a.primary_uom_code primary_uom_code,
|
||||
a.primary_unit_of_measure primary_unit_of_measure,
|
||||
a.purchase_flag purchase_flag,
|
||||
a.sales_flag sales_flag,
|
||||
a.in_area in_area,
|
||||
a.out_area out_area,
|
||||
a.effective_status effective_status,
|
||||
a.processing_type processing_type,
|
||||
a.read_tag read_tag,
|
||||
a.read_date read_date,
|
||||
a.error_message error_message,
|
||||
IFNULL( SUM( b.settlement ), 0.0000000000 ) purchasesWeight,
|
||||
(
|
||||
CASE
|
||||
( SELECT COUNT( DISTINCT COALESCE ( purchase_code, 'NULL' )) FROM jg_poundlist WHERE material_code = a.id )
|
||||
WHEN 0 THEN
|
||||
0.0000000000 ELSE IFNULL( SUM( b.settlement ), 0.0000000000 )
|
||||
END
|
||||
) salesWeight,
|
||||
( SELECT COUNT( DISTINCT COALESCE ( purchase_code, 'NULL' )) FROM jg_poundlist WHERE material_code = a.id ) salesNumber,
|
||||
( SELECT COUNT( DISTINCT COALESCE ( purchase_code, 'NULL' )) FROM jg_poundlist WHERE material_code = a.id OR material_code IS NULL ) purchasesNumber
|
||||
FROM
|
||||
jg_material a
|
||||
LEFT JOIN jg_poundlist b ON a.id = b.material_code
|
||||
AND ( b.purchase_status != 0 OR b.purchase_status IS NULL )
|
||||
AND ( b.purchase_status != 99 OR b.purchase_status IS NULL )
|
||||
AND ( b.pound_status != '1' OR b.pound_status IS NULL )
|
||||
|
||||
GROUP BY
|
||||
a.id
|
||||
) aaa
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
|
||||
<!--获取派工单信息映射-->
|
||||
<resultMap id="findWorkOrderByCondition" type="jnpf.material.entity.MaterialMobileEntity">
|
||||
<result column="id" property="id"/>
|
||||
<result column="creator_user_id" property="creatoruserid"/>
|
||||
<result column="creator_user_name" property="creatorusername"/>
|
||||
<result column="creator_time" property="creatortime"/>
|
||||
<result column="last_modify_user_id" property="lastmodifyuserid"/>
|
||||
<result column="last_modify_user_name" property="lastmodifyusername"/>
|
||||
<result column="last_modify_time" property="lastmodifytime"/>
|
||||
<result column="delete_user_id" property="deleteuserid"/>
|
||||
<result column="delete_user_name" property="deleteusername"/>
|
||||
<result column="delete_time" property="deletetime"/>
|
||||
<result column="delete_mark" property="deletemark"/>
|
||||
<result column="orgnize_id" property="orgnizeId"/>
|
||||
<result column="department_id" property="departmentId"/>
|
||||
<result column="m_id" property="mId"/>
|
||||
<result column="item_id" property="itemId"/>
|
||||
<result column="item_code" property="itemCode"/>
|
||||
<result column="organization_id" property="organizationId"/>
|
||||
<result column="organization_code" property="organizationCode"/>
|
||||
<result column="description" property="description"/>
|
||||
<result column="primary_uom_code" property="primaryUomCode"/>
|
||||
<result column="primary_unit_of_measure" property="primaryUnitOmeasure"/>
|
||||
<result column="purchase_flag" property="purchaseFlag"/>
|
||||
<result column="sales_flag" property="salesFlag"/>
|
||||
<result column="in_area" property="inArea"/>
|
||||
<result column="out_area" property="outArea"/>
|
||||
<result column="effective_status" property="effectiveStatus"/>
|
||||
<result column="processing_type" property="processingType"/>
|
||||
<result column="read_tag" property="readTag"/>
|
||||
<result column="read_date" property="readDate"/>
|
||||
<result column="error_message" property="errorMessage"/>
|
||||
<result column="purchasesNumber" property="purchasesNumber"/>
|
||||
<result column="purchasesWeight" property="purchasesWeight"/>
|
||||
<result column="salesNumber" property="salesNumber"/>
|
||||
<result column="salesWeight" property="salesWeight"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/SC-screen-web.iml" filepath="$PROJECT_DIR$/.idea/SC-screen-web.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
|
||||
</component>
|
||||
</project>
|
Loading…
Reference in new issue