1、零售出库添加会员卡号快捷方式

2、销售订单、销售出库添加客户快捷方式
3、仓库添加默认仓库
4、零售、销售、采购的商品明细仓库默认选中默认仓库
This commit is contained in:
double
2019-04-23 14:00:30 +08:00
parent a92bf8d39b
commit a95ecbda1b
12 changed files with 607 additions and 98 deletions

View File

@@ -86,7 +86,7 @@ public class BusinessConstants {
/**
* create by: qiankunpingtai
* create time: 2019/3/14 11:41
* description:
* description:
* 为了使用户可以自己建初始目录设定根目录的父级目录id为-1
*
*/

View File

@@ -207,5 +207,16 @@ public class DepotController {
}
return result;
}
@PostMapping(value = "/updateDepotIsDefault")
public String updateDepotIsDefault(@RequestParam("isDefault") Boolean isDefault,
@RequestParam("depotID") Long depotID,
HttpServletRequest request) throws Exception{
Map<String, Object> objectMap = new HashMap<String, Object>();
int res = depotService.updateDepotIsDefault(isDefault, depotID);
if(res > 0) {
return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code);
} else {
return returnJson(objectMap, ErpInfo.ERROR.name, ErpInfo.ERROR.code);
}
}
}

View File

@@ -448,7 +448,7 @@ public class DepotItemController {
BigDecimal InPrice = sumPrice("入库", pid, diEx.getMId(), monthTime, false);
BigDecimal OutPrice = sumPrice("出库", pid, diEx.getMId(), monthTime, false);
item.put("MaterialName", diEx.getMName());
item.put("MaterialModel", diEx.getMColor());
item.put("MaterialModel", diEx.getMModel());
//扩展信息
String materialOther = getOtherInfo(mpArr, diEx);
item.put("MaterialOther", materialOther);

View File

@@ -90,6 +90,15 @@ public class Depot {
* @mbggenerated
*/
private String deleteFlag;
private Boolean isdefault;
public Boolean getIsdefault() {
return isdefault;
}
public void setIsdefault(Boolean isdefault) {
this.isdefault = isdefault;
}
/**
* This method was generated by MyBatis Generator.
@@ -354,4 +363,4 @@ public class Depot {
public void setDeleteFlag(String deleteFlag) {
this.deleteFlag = deleteFlag == null ? null : deleteFlag.trim();
}
}
}

View File

@@ -235,6 +235,7 @@ public class DepotExample {
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
@@ -664,7 +665,65 @@ public class DepotExample {
addCriterion("remark <>", value, "remark");
return (Criteria) this;
}
public Criteria andIsdefaultIsNull() {
addCriterion("IsDefault is null");
return (Criteria) this;
}
public Criteria andIsdefaultIsNotNull() {
addCriterion("IsDefault is not null");
return (Criteria) this;
}
public Criteria andIsdefaultEqualTo(Boolean value) {
addCriterion("IsDefault =", value, "isdefault");
return (Criteria) this;
}
public Criteria andIsdefaultNotEqualTo(Boolean value) {
addCriterion("IsDefault <>", value, "isdefault");
return (Criteria) this;
}
public Criteria andIsdefaultGreaterThan(Boolean value) {
addCriterion("IsDefault >", value, "isdefault");
return (Criteria) this;
}
public Criteria andIsdefaultGreaterThanOrEqualTo(Boolean value) {
addCriterion("IsDefault >=", value, "isdefault");
return (Criteria) this;
}
public Criteria andIsdefaultLessThan(Boolean value) {
addCriterion("IsDefault <", value, "isdefault");
return (Criteria) this;
}
public Criteria andIsdefaultLessThanOrEqualTo(Boolean value) {
addCriterion("IsDefault <=", value, "isdefault");
return (Criteria) this;
}
public Criteria andIsdefaultIn(List<Boolean> values) {
addCriterion("IsDefault in", values, "isdefault");
return (Criteria) this;
}
public Criteria andIsdefaultNotIn(List<Boolean> values) {
addCriterion("IsDefault not in", values, "isdefault");
return (Criteria) this;
}
public Criteria andIsdefaultBetween(Boolean value1, Boolean value2) {
addCriterion("IsDefault between", value1, value2, "isdefault");
return (Criteria) this;
}
public Criteria andIsdefaultNotBetween(Boolean value1, Boolean value2) {
addCriterion("IsDefault not between", value1, value2, "isdefault");
return (Criteria) this;
}
public Criteria andRemarkGreaterThan(String value) {
addCriterion("remark >", value, "remark");
return (Criteria) this;
@@ -1010,4 +1069,4 @@ public class DepotExample {
this(condition, value, secondValue, null);
}
}
}
}

View File

@@ -316,4 +316,24 @@ public class DepotService {
return deleteTotal;
}
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
public int updateDepotIsDefault(Boolean isDefault, Long depotID) throws Exception{
logService.insertLog(BusinessConstants.LOG_INTERFACE_NAME_DEPOT,BusinessConstants.LOG_OPERATION_TYPE_EDIT+depotID,
((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest());
Depot depot = new Depot();
depot.setIsdefault(isDefault);
DepotExample example = new DepotExample();
example.createCriteria().andIdEqualTo(depotID);
int result=0;
try{
result = depotMapper.updateByExampleSelective(depot, example);
}catch(Exception e){
logger.error("异常码[{}],异常提示[{}],异常[{}]",
ExceptionConstants.DATA_WRITE_FAIL_CODE,ExceptionConstants.DATA_WRITE_FAIL_MSG,e);
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
ExceptionConstants.DATA_WRITE_FAIL_MSG);
}
return result;
}
}

View File

@@ -1,5 +1,5 @@
<?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">
<?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="com.jsh.erp.datasource.mappers.DepotMapper">
<resultMap id="BaseResultMap" type="com.jsh.erp.datasource.entities.Depot">
<!--
@@ -17,6 +17,7 @@
<result column="principal" jdbcType="BIGINT" property="principal" />
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" />
<result column="delete_Flag" jdbcType="VARCHAR" property="deleteFlag" />
<result column="IsDefault" jdbcType="BIT" property="isdefault" />
</resultMap>
<sql id="Example_Where_Clause">
<!--
@@ -89,8 +90,8 @@
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, name, address, warehousing, truckage, type, sort, remark, principal, tenant_id,
delete_Flag
id, name, address, warehousing, truckage, type, sort, remark, principal, tenant_id,
delete_Flag,IsDefault
</sql>
<select id="selectByExample" parameterType="com.jsh.erp.datasource.entities.DepotExample" resultMap="BaseResultMap">
<!--
@@ -115,7 +116,7 @@
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
select
<include refid="Base_Column_List" />
from jsh_depot
where id = #{id,jdbcType=BIGINT}
@@ -143,13 +144,13 @@
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into jsh_depot (id, name, address,
warehousing, truckage, type,
sort, remark, principal,
insert into jsh_depot (id, name, address,
warehousing, truckage, type,
sort, remark, principal,
tenant_id, delete_Flag)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR},
#{warehousing,jdbcType=DECIMAL}, #{truckage,jdbcType=DECIMAL}, #{type,jdbcType=INTEGER},
#{sort,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{principal,jdbcType=BIGINT},
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR},
#{warehousing,jdbcType=DECIMAL}, #{truckage,jdbcType=DECIMAL}, #{type,jdbcType=INTEGER},
#{sort,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{principal,jdbcType=BIGINT},
#{tenantId,jdbcType=BIGINT}, #{deleteFlag,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.jsh.erp.datasource.entities.Depot">
@@ -279,6 +280,9 @@
<if test="record.deleteFlag != null">
delete_Flag = #{record.deleteFlag,jdbcType=VARCHAR},
</if>
<if test="record.isdefault != null">
IsDefault = #{record.isdefault,jdbcType=BIT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
@@ -363,4 +367,4 @@
delete_Flag = #{deleteFlag,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
</mapper>