登录,业务单据修改

master
anthonyywj2 3 years ago
parent 1a51186b72
commit b57d1badbb

@ -5,6 +5,7 @@ import com.glxp.sale.admin.constant.Constant;
import com.glxp.sale.admin.dao.auth.AuthLicenseDao;
import com.glxp.sale.admin.entity.auth.AuthAdmin;
import com.glxp.sale.admin.entity.auth.AuthLicense;
import com.glxp.sale.admin.entity.auth.CustomerInfoEntity;
import com.glxp.sale.admin.entity.info.CompanyEntity;
import com.glxp.sale.admin.exception.JsonException;
import com.glxp.sale.admin.req.auth.LoginRequest;
@ -12,6 +13,7 @@ import com.glxp.sale.admin.req.auth.UpdatePasswordRequest;
import com.glxp.sale.admin.res.auth.LoginUserInfoResponse;
import com.glxp.sale.admin.service.auth.AuthAdminService;
import com.glxp.sale.admin.service.auth.AuthLoginService;
import com.glxp.sale.admin.service.auth.CustomerInfoService;
import com.glxp.sale.admin.service.info.CompanyService;
import com.glxp.sale.admin.util.AppUtils;
import com.glxp.sale.admin.util.IpUtils;
@ -52,6 +54,8 @@ public class LoginController {
@Resource
private AuthLicenseDao authLicenseDao;
@Resource
CustomerInfoService customerInfoService;
/**
*
@ -68,8 +72,18 @@ public class LoginController {
AuthAdmin authAdmin;
if (loginRequest.getType() != null && loginRequest.getType() == 1) {
authAdmin = authAdminService.findByUser(loginRequest.getUsername(), Constant.SYSTEM_CUSTOMER_ID);
} else
} else {
authAdmin = authAdminService.findByUserName(loginRequest.getUsername());
if (authAdmin.getCustomerId() != 110) {
if (authAdmin.getUserFlag() == 0) {
throw new JsonException(ResultEnum.DATA_NOT, "该用户已被禁用!");
}
CustomerInfoEntity customerInfoEntity = customerInfoService.selectById(authAdmin.getCustomerId());
if (customerInfoEntity.getUserFlag() == 0) {
throw new JsonException(ResultEnum.DATA_NOT, "该企业账户已被禁用!");
}
}
}
if (authAdmin == null) {
throw new JsonException(ResultEnum.DATA_NOT, "用户名或密码错误");
}

@ -116,6 +116,12 @@ public class BussinessTypeServiceImpl implements BussinessTypeService {
@Override
public boolean insertBussinessType(BussinessTypeEntity bussinessTypeEntity) {
if (!StrUtil.isEmpty(bussinessTypeEntity.getSupplementOrderType())){
BussinessTypeEntity correspondType = bussinessTypeDao.selectByAction(bussinessTypeEntity.getSupplementOrderType());
if (correspondType != null && correspondType.getCorpType() == 1) {
bussinessTypeDao.updateSupplementOrderType(bussinessTypeEntity.getSupplementOrderType(), bussinessTypeEntity.getAction());
}
}
return bussinessTypeDao.insertBussinessType(bussinessTypeEntity);
}

@ -5,7 +5,8 @@
<select id="filterList" parameterType="com.glxp.sale.admin.req.basic.BussinessLocalTypeFilterRequest"
resultType="com.glxp.sale.admin.entity.basic.BussinessLocalTypeEntity">
SELECT * FROM basic_bustype_local
SELECT basic_bustype_local.* ,basic_bussiness_type.mainAction from basic_bustype_local LEFT JOIN
basic_bussiness_type on basic_bussiness_type.localAction = basic_bustype_local.action
<where>
<if test="name != ''and name != null">
AND name LIKE concat(#{name},'%')
@ -110,7 +111,7 @@
<insert id="insertBussinessType" keyProperty="id"
parameterType="com.glxp.sale.admin.entity.basic.BussinessLocalTypeEntity">
INSERT INTO basic_bustype_local
(action, name, remark, originAction, advanceType, changeEnable, spUse)
(action, name, remark, originAction, advanceType, changeEnable, spUse)
values (#{action},
#{name},
#{remark}, #{originAction}, #{advanceType}, #{changeEnable}, #{spUse})

@ -129,7 +129,8 @@
checkEnable,genUnit,innerOrder,secCheckEnable,
checkUdims,checkPdaEd,checkPdaUn,checkPc,checkWebNew,checkChange
,secCheckUdims,secCheckPdaEd,secCheckPdaUn,secCheckPc,secCheckWebNew,
secCheckChange,corpType,basic_bussiness_type.storageCode,checkBalacne,secCheckBalacne)
secCheckChange,corpType,basic_bussiness_type.storageCode,checkBalacne,
secCheckBalacne,supplementOrderType)
values
(
#{action},
@ -156,7 +157,7 @@
#{secCheckWebNew},
#{secCheckChange},
#{corpType},
#{storageCode},#{checkBalacne},#{secCheckBalacne}
#{storageCode},#{checkBalacne},#{secCheckBalacne},#{supplementOrderType}
)
</insert>
@ -169,7 +170,8 @@
(`index`,action,name,enable,remark,mainAction,localAction,thirdSysFk,
checkEnable,genUnit,innerOrder,secCheckEnable,
checkUdims,checkPdaEd,checkPdaUn,checkPc,checkWebNew,checkChange
,secCheckUdims,secCheckPdaEd,secCheckPdaUn,secCheckPc,secCheckWebNew,secCheckChange,corpType,storageCode,checkBalacne,secCheckBalacne)
,secCheckUdims,secCheckPdaEd,secCheckPdaUn,secCheckPc,secCheckWebNew,
secCheckChange,corpType,storageCode,checkBalacne,secCheckBalacne,supplementOrderType)
values
(
#{index},
@ -197,7 +199,7 @@
#{secCheckWebNew},
#{secCheckChange},
#{corpType},
#{storageCode},#{checkBalacne},#{secCheckBalacnesecCheckBalacne}
#{storageCode},#{checkBalacne},#{secCheckBalacnesecCheckBalacne},#{supplementOrderType}
)
</insert>

Loading…
Cancel
Save