Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
0a5d34f2a7
|
|
@ -4,6 +4,8 @@ public enum CardRecordTypeEnum {
|
||||||
APPLY(1, "发卡"),
|
APPLY(1, "发卡"),
|
||||||
REFUND(2, "退卡"),
|
REFUND(2, "退卡"),
|
||||||
CHANGE(3, "换卡");
|
CHANGE(3, "换卡");
|
||||||
|
// LOSS(4, "挂失"),
|
||||||
|
// RELIEVE(5, "解挂");
|
||||||
|
|
||||||
private final Integer key;
|
private final Integer key;
|
||||||
private final String desc;
|
private final String desc;
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import com.bonus.canteen.core.account.constants.CardRecordTypeEnum;
|
import com.bonus.canteen.core.account.constants.CardRecordTypeEnum;
|
||||||
|
import com.bonus.canteen.core.account.constants.CardStatusEnum;
|
||||||
import com.bonus.common.log.enums.OperaType;
|
import com.bonus.common.log.enums.OperaType;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
|
@ -121,6 +122,36 @@ public class AccCardController extends BaseController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "挂失")
|
||||||
|
//@PreventRepeatSubmit
|
||||||
|
//@RequiresPermissions("account:card:edit")
|
||||||
|
@SysLog(title = "人员卡片资料", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->挂失")
|
||||||
|
@PostMapping("/loss")
|
||||||
|
public AjaxResult loss(@RequestBody AccCard accCard) {
|
||||||
|
try {
|
||||||
|
//accCard.setOperationType(CardRecordTypeEnum.LOSS.getKey());
|
||||||
|
accCard.setCardStatus(CardStatusEnum.LOSS.getKey());
|
||||||
|
return toAjax(accCardService.updateAccCard(accCard));
|
||||||
|
} catch (Exception e) {
|
||||||
|
return error("系统错误, " + e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "解挂")
|
||||||
|
//@PreventRepeatSubmit
|
||||||
|
//@RequiresPermissions("account:card:edit")
|
||||||
|
@SysLog(title = "人员卡片资料", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->解挂")
|
||||||
|
@PostMapping("/relieve")
|
||||||
|
public AjaxResult relieve(@RequestBody AccCard accCard) {
|
||||||
|
try {
|
||||||
|
//accCard.setOperationType(CardRecordTypeEnum.RELIEVE.getKey());
|
||||||
|
accCard.setCardStatus(CardStatusEnum.NORMAL.getKey());
|
||||||
|
return toAjax(accCardService.updateAccCard(accCard));
|
||||||
|
} catch (Exception e) {
|
||||||
|
return error("系统错误, " + e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "退卡")
|
@ApiOperation(value = "退卡")
|
||||||
//@PreventRepeatSubmit
|
//@PreventRepeatSubmit
|
||||||
//@RequiresPermissions("account:card:edit")
|
//@RequiresPermissions("account:card:edit")
|
||||||
|
|
@ -129,6 +160,7 @@ public class AccCardController extends BaseController {
|
||||||
public AjaxResult refund(@RequestBody AccCard accCard) {
|
public AjaxResult refund(@RequestBody AccCard accCard) {
|
||||||
try {
|
try {
|
||||||
accCard.setOperationType(CardRecordTypeEnum.REFUND.getKey());
|
accCard.setOperationType(CardRecordTypeEnum.REFUND.getKey());
|
||||||
|
accCard.setCardStatus(CardStatusEnum.REFUND.getKey());
|
||||||
return toAjax(accCardService.updateAccCard(accCard));
|
return toAjax(accCardService.updateAccCard(accCard));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return error("系统错误, " + e.getMessage());
|
return error("系统错误, " + e.getMessage());
|
||||||
|
|
|
||||||
|
|
@ -144,7 +144,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where acc_id = #{accId}
|
where acc_id = #{accId} and card_status != 6
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<delete id="deleteAccCardById" parameterType="Long">
|
<delete id="deleteAccCardById" parameterType="Long">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue