Commit fa2be4e5 by 肖洋洋

外部接口对接代码

parent 8ae66d7e
...@@ -49,7 +49,7 @@ public class Sync { ...@@ -49,7 +49,7 @@ public class Sync {
@GetMapping("/item") @GetMapping("/item")
public void sync1(){ public void sync1(){
int j=210295; int j=461591;
while (true){ while (true){
try { try {
List<TempItemFomPmp> limit = tempItemFomPmpMapper.findLimit(j); List<TempItemFomPmp> limit = tempItemFomPmpMapper.findLimit(j);
...@@ -139,12 +139,12 @@ public class Sync { ...@@ -139,12 +139,12 @@ public class Sync {
invItemMapper.insertBatch(invItems); invItemMapper.insertBatch(invItems);
invItemSkuMapper.insertBatch(invItemSkus); invItemSkuMapper.insertBatch(invItemSkus);
invItemAttributeMapper.insertBatch(invItemAttributes); invItemAttributeMapper.insertBatch(invItemAttributes);
j=j+4999; j=j+999;
logger.info("前"+j+"条同步完成"); logger.info("前"+j+"条同步完成");
}catch (Exception e){ }catch (Exception e){
logger.error("同步失败的下标段"+j+"-"+(j+4999)); logger.error("同步失败的下标段"+j+"-"+(j+999));
logger.error(e.getMessage()); logger.error(e.getMessage());
j=j+4999; j=j+999;
} }
} }
...@@ -156,11 +156,15 @@ public class Sync { ...@@ -156,11 +156,15 @@ public class Sync {
@Autowired @Autowired
private TransactionController transactionController; private TransactionController transactionController;
@Autowired
private InvTransactionMapper invTransactionMapper;
@GetMapping("/sku") @GetMapping("/sku")
public void addInvItemSku(){ public void addInvItemSku(){
List<TempItemSkuFomPmp> select = tempItemSkuFomPmpMapper.select(); List<TempItemSkuFomPmp> select = tempItemSkuFomPmpMapper.select();
int i=0; int i=0;
for (TempItemSkuFomPmp tempItemSkuFomPmp:select) { for (TempItemSkuFomPmp tempItemSkuFomPmp:select) {
try {
JSONObject jsonObject=new JSONObject(); JSONObject jsonObject=new JSONObject();
JSONObject data=new JSONObject(); JSONObject data=new JSONObject();
data.put("inv_code","WH2"); data.put("inv_code","WH2");
...@@ -179,6 +183,11 @@ public class Sync { ...@@ -179,6 +183,11 @@ public class Sync {
String s = transactionController.invItemInOut("201910271129039497a78b526d9a246eca0abb1025986f25cG7BHIxhVaDO6MYm", jsonObject); String s = transactionController.invItemInOut("201910271129039497a78b526d9a246eca0abb1025986f25cG7BHIxhVaDO6MYm", jsonObject);
i++; i++;
logger.info("同步到"+i+"条"+",一共"+select.size()+"条"); logger.info("同步到"+i+"条"+",一共"+select.size()+"条");
}catch (Exception e){
logger.error(tempItemSkuFomPmp.getPlucode()+"同步失败");
logger.error(e.getMessage());
i++;
}
} }
} }
} }
...@@ -100,16 +100,16 @@ public class SyncSalFromPos { ...@@ -100,16 +100,16 @@ public class SyncSalFromPos {
salOrderHeader.setOrderNumber(propertiesServer.generateFlowingWater("SAL_ORDER_NUMBER")); salOrderHeader.setOrderNumber(propertiesServer.generateFlowingWater("SAL_ORDER_NUMBER"));
salOrderHeader.setCustomerId("2c9007626df2ab5b016dfd0edccb0039"); salOrderHeader.setCustomerId("2c9007626df2ab5b016dfd0edccb0039");
salOrderHeader.setOrderCurrency("CNY"); salOrderHeader.setOrderCurrency("CNY");
if(paymentMethod.equals("001")){ // if(paymentMethod.equals("001")){
salOrderHeader.setPaymentMethod("CASH"); // salOrderHeader.setPaymentMethod("CASH");
}else if(paymentMethod.equals("098")){ // }else if(paymentMethod.equals("098")){
salOrderHeader.setPaymentMethod("ALIPAY"); // salOrderHeader.setPaymentMethod("ALIPAY");
}else if(paymentMethod.equals("099")){ // }else if(paymentMethod.equals("099")){
salOrderHeader.setPaymentMethod("WECHAT"); // salOrderHeader.setPaymentMethod("WECHAT");
}else{ // }else{
salOrderHeader.setPaymentMethod("OTHER"); // salOrderHeader.setPaymentMethod("OTHER");
} // }
salOrderHeader.setPaymentMethod(paymentMethod);
salOrderHeader.setSellerId("a9a2c497f64011e9a1b10242ac110002"); salOrderHeader.setSellerId("a9a2c497f64011e9a1b10242ac110002");
//封装从表数据 //封装从表数据
......
...@@ -68,6 +68,53 @@ public class TakeStockController { ...@@ -68,6 +68,53 @@ public class TakeStockController {
return new Result(true,StatusCode.OK,"查询成功",invInventories); return new Result(true,StatusCode.OK,"查询成功",invInventories);
} }
@Autowired
private InvAccessMapper invAccessMapper;
@Autowired
private SysUserRoleMapper sysUserRoleMapper;
@Autowired
private SysRoleMapper sysRoleMapper;
/**
* 查询当前用户可以操作的库存
* @param token
* @return
*/
@GetMapping("/invInventory/searchByAccess")
public Result invInventorysearchByAccess(@RequestParam("access_token")String token) {
SysAccessToken sysAccessToken = userServer.checkToken(token);
List<SysUserRole> sysUserRoles = sysUserRoleMapper.selectRoleByUserId(sysAccessToken.getUserId(), LocalDateTime.now());
if(sysUserRoles==null || sysUserRoles.size()<=0){
return new Result(false, StatusCode.ERROR,"请维护该用户的角色信息");
}
List<String> invIds=new ArrayList<>();
for (SysUserRole sysUserRole:sysUserRoles) {
if(sysUserRole.getRoleId().equals("f6817f48af4fb3af11b9e8bf182f618b")){
List<InvInventory> select = invInventoryMapper.select();
return new Result(true,StatusCode.OK,"查询成功",select);
}
List<String> attribute1 = invAccessMapper.getAttribute1(sysUserRole.getRoleId(), LocalDateTime.now());
invIds.addAll(attribute1);
}
if(invIds==null || invIds.size()<=0){
return new Result(false, StatusCode.ERROR,"该用户没有权限操作库存");
}
List<InvInventory> invInventories=new ArrayList<>();
for (String invId:invIds) {
InvInventory invInventory = invInventoryMapper.selectById(invId);
if(invInventory==null){
continue;
}
invInventories.add(invInventory);
}
return new Result(true,StatusCode.OK,"查询成功",invInventories);
}
/** /**
* 通过库存id查询库区 * 通过库存id查询库区
* @param token * @param token
......
...@@ -1979,11 +1979,11 @@ public class PurchaseController { ...@@ -1979,11 +1979,11 @@ public class PurchaseController {
private List<RcvReceiptHeaderV> getUniqueRcvReceiptHeader(String userName, String userId, String status, String invId) { private List<RcvReceiptHeaderV> getUniqueRcvReceiptHeader(String userName, String userId, String status, String invId) {
List<RcvReceiptHeaderV> rcvReceiptHeaderVList = new ArrayList<>(); List<RcvReceiptHeaderV> rcvReceiptHeaderVList = new ArrayList<>();
//由用户创建的头订单,status状态可选 //由用户创建的头订单,status状态可选
rcvReceiptHeaderVList.addAll(purchaseServer.selectRcvReceiptHeaderVByUserNameAndStatus(userName, status)); rcvReceiptHeaderVList.addAll(purchaseServer.selectRcvReceiptHeaderVByUserNameAndStatusG(status));
List<String> invIdList = getValidInvIdByUserId(userId); // List<String> invIdList = getValidInvIdByUserId(userId);
if (invIdList.size() > 0) { // if (invIdList.size() > 0) {
rcvReceiptHeaderVList.addAll(purchaseServer.selectRcvReceiptHeaderVByInvIdAndStatus(invIdList,status)); // rcvReceiptHeaderVList.addAll(purchaseServer.selectRcvReceiptHeaderVByInvIdAndStatus(invIdList,status));
} // }
//去重 //去重
List<RcvReceiptHeaderV> uniqueHead = rcvReceiptHeaderVList.stream().collect( List<RcvReceiptHeaderV> uniqueHead = rcvReceiptHeaderVList.stream().collect(
Collectors.collectingAndThen(Collectors.toCollection( Collectors.collectingAndThen(Collectors.toCollection(
...@@ -1998,11 +1998,11 @@ public class PurchaseController { ...@@ -1998,11 +1998,11 @@ public class PurchaseController {
String statusFrom, String statusTo, String invId) { String statusFrom, String statusTo, String invId) {
List<RcvReceiptHeaderV> rcvReceiptHeaderVList = new ArrayList<>(); List<RcvReceiptHeaderV> rcvReceiptHeaderVList = new ArrayList<>();
//由用户创建的头订单,status状态可选 //由用户创建的头订单,status状态可选
rcvReceiptHeaderVList.addAll(purchaseServer.selectRcvReceiptHeaderVByUserNameInStatusRange(userName, statusFrom, statusTo)); rcvReceiptHeaderVList.addAll(purchaseServer.selectRcvReceiptHeaderVByUserNameInStatusRangeG(statusFrom, statusTo));
List<String> invIdList = getValidInvIdByUserId(userId); // List<String> invIdList = getValidInvIdByUserId(userId);
if (invIdList.size() > 0) { // if (invIdList.size() > 0) {
rcvReceiptHeaderVList.addAll(purchaseServer.selectRcvReceiptHeaderVByInvIdInStatusRange(invIdList,statusFrom, statusTo)); // rcvReceiptHeaderVList.addAll(purchaseServer.selectRcvReceiptHeaderVByInvIdInStatusRange(invIdList,statusFrom, statusTo));
} // }
//去重 //去重
List<RcvReceiptHeaderV> uniqueHead = rcvReceiptHeaderVList.stream().collect( List<RcvReceiptHeaderV> uniqueHead = rcvReceiptHeaderVList.stream().collect(
Collectors.collectingAndThen(Collectors.toCollection( Collectors.collectingAndThen(Collectors.toCollection(
......
package orthopedics.dao;
import java.time.LocalDateTime;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Insert;
import orthopedics.model.InvAccess;
/**
* @author author
*/
public interface InvAccessMapper{
@Select("SELECT * FROM inv_access")
@Results(id = "invaccess", value ={
@Result(property = "id", column = "id"),
@Result(property = "createBy", column = "create_by"),
@Result(property = "createTime", column = "create_time"),
@Result(property = "updateBy", column = "update_by"),
@Result(property = "updateTime", column = "update_time"),
@Result(property = "attributeCategory", column = "attribute_category"),
@Result(property = "attribute1", column = "attribute1"),
@Result(property = "attribute2", column = "attribute2"),
@Result(property = "attribute3", column = "attribute3"),
@Result(property = "attribute4", column = "attribute4"),
@Result(property = "attribute5", column = "attribute5"),
@Result(property = "attribute6", column = "attribute6"),
@Result(property = "attribute7", column = "attribute7"),
@Result(property = "attribute8", column = "attribute8"),
@Result(property = "attribute9", column = "attribute9"),
@Result(property = "attribute10", column = "attribute10"),
@Result(property = "userId", column = "user_id"),
@Result(property = "invId", column = "inv_id"),
@Result(property = "txAllowed", column = "tx_allowed"),
@Result(property = "entryAllowed", column = "entry_allowed"),
@Result(property = "startDate", column = "start_date"),
@Result(property = "endDate", column = "end_date"),
})
public List<InvAccess> select();
@Insert("<script>" +
"INSERT INTO inv_access(id,create_by,create_time,update_by,update_time,attribute_category,attribute1,attribute2,attribute3,attribute4,attribute5,attribute6,attribute7,attribute8,attribute9,attribute10,user_id,inv_id,tx_allowed,entry_allowed,start_date,end_date) VALUES" +
"<foreach collection='invaccesss' item='item' index='index' separator=','>" +
"(#{item.id},#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime},#{item.attributeCategory},#{item.attribute1},#{item.attribute2},#{item.attribute3},#{item.attribute4},#{item.attribute5},#{item.attribute6},#{item.attribute7},#{item.attribute8},#{item.attribute9},#{item.attribute10},#{item.userId},#{item.invId},#{item.txAllowed},#{item.entryAllowed},#{item.startDate},#{item.endDate})" +
"</foreach>" +
"</script>")
Integer insertBatch(@Param("invaccesss") List<InvAccess> InvAccessList);
@Insert(
"INSERT INTO inv_access(id,create_by,create_time,update_by,update_time,attribute_category,attribute1,attribute2,attribute3,attribute4,attribute5,attribute6,attribute7,attribute8,attribute9,attribute10,user_id,inv_id,tx_allowed,entry_allowed,start_date,end_date) VALUES" +
"(#{id},#{createBy},#{createTime},#{updateBy},#{updateTime},#{attributeCategory},#{attribute1},#{attribute2},#{attribute3},#{attribute4},#{attribute5},#{attribute6},#{attribute7},#{attribute8},#{attribute9},#{attribute10},#{userId},#{invId},#{txAllowed},#{entryAllowed},#{startDate},#{endDate})"
)
Integer insert(InvAccess InvAccess);
@Select("SELECT inv_id FROM inv_access WHERE entry_allowed='Y' AND user_id=#{userId} AND #{now}<end_date")
public List<String> getInvId(@Param("userId") String userId,@Param("now") LocalDateTime now);
@Select("SELECT inv_id FROM inv_access WHERE entry_allowed='Y' AND attribute1=#{attribute1} AND ((#{now} > start_date AND end_date IS NULL) OR (#{now} BETWEEN start_date AND end_date))")
public List<String> getAttribute1(@Param("attribute1") String attribute1,@Param("now") LocalDateTime now);
}
\ No newline at end of file
...@@ -88,6 +88,15 @@ public List<RcvReceiptHeaderV> selectById(@Param("headerId")String headerId); ...@@ -88,6 +88,15 @@ public List<RcvReceiptHeaderV> selectById(@Param("headerId")String headerId);
@Select("<script>" @Select("<script>"
+ "SELECT * FROM rcv_receipt_header_v WHERE 1=1 " + "SELECT * FROM rcv_receipt_header_v WHERE 1=1 "
+ "<if test = 'rcvReceiptHeaderStatus != null and rcvReceiptHeaderStatus != \"\"'>"
+ "AND header_status = #{rcvReceiptHeaderStatus}"
+ "</if>"
+ "</script>")
@ResultMap("rcvreceiptheaderv")
public List<RcvReceiptHeaderV> selectByUserAndStatusG(@Param("rcvReceiptHeaderStatus")String rcvReceiptHeaderStatus);
@Select("<script>"
+ "SELECT * FROM rcv_receipt_header_v WHERE 1=1 "
+ " AND inv_id in " + " AND inv_id in "
+ "<foreach collection='invIds' item='invId' index='index' open='(' close=')' separator=','>" + "<foreach collection='invIds' item='invId' index='index' open='(' close=')' separator=','>"
+ "#{invId}" + "#{invId}"
...@@ -120,6 +129,27 @@ public List<RcvReceiptHeaderV> selectById(@Param("headerId")String headerId); ...@@ -120,6 +129,27 @@ public List<RcvReceiptHeaderV> selectById(@Param("headerId")String headerId);
@Param("statusFrom")String statusFrom, @Param("statusFrom")String statusFrom,
@Param("statusTo")String statusTo); @Param("statusTo")String statusTo);
@Select("SELECT rh.* FROM rcv_receipt_header_v rh " +
"LEFT JOIN sys_value_set_v vs " +
"ON (vs.value_set_code = 'RECEIPT_HEADER_STATUS' " +
"AND vs.value_code = rh.header_status AND vs.set_status = 'A' AND vs.value_status = 'A') " +
"WHERE 1=1 AND " +
"vs.value_tag+0 " +
"BETWEEN " +
"(" +
"SELECT value_tag+0 FROM sys_value_set_v vs " +
"WHERE vs.value_set_code = 'RECEIPT_HEADER_STATUS' AND vs.value_code = #{statusFrom} AND vs.set_status = 'A' AND vs.value_status = 'A' " +
") " +
"AND " +
"(" +
"SELECT value_tag+0 FROM sys_value_set_v vs " +
"WHERE vs.value_set_code = 'RECEIPT_HEADER_STATUS' AND vs.value_code = #{statusTo} AND vs.set_status = 'A' AND vs.value_status = 'A' " +
") ")
@ResultMap("rcvreceiptheaderv")
public List<RcvReceiptHeaderV> selectByUserAndStatusRangeG(@Param("statusFrom")String statusFrom,
@Param("statusTo")String statusTo);
@Select("<script>" + @Select("<script>" +
"SELECT rh.* FROM rcv_receipt_header_v rh " + "SELECT rh.* FROM rcv_receipt_header_v rh " +
"LEFT JOIN sys_value_set_v vs " + "LEFT JOIN sys_value_set_v vs " +
......
package orthopedics.dao;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Insert;
import orthopedics.model.SysRole;
/**
* @author author
*/
public interface SysRoleMapper{
@Select("SELECT * FROM sys_role")
@Results(id = "sysrole", value ={
@Result(property = "id", column = "id"),
@Result(property = "roleName", column = "role_name"),
@Result(property = "roleCode", column = "role_code"),
@Result(property = "description", column = "description"),
@Result(property = "createBy", column = "create_by"),
@Result(property = "createTime", column = "create_time"),
@Result(property = "updateBy", column = "update_by"),
@Result(property = "updateTime", column = "update_time"),
@Result(property = "status", column = "status"),
@Result(property = "attributeCategory", column = "attribute_category"),
@Result(property = "attribute1", column = "attribute1"),
@Result(property = "attribute2", column = "attribute2"),
@Result(property = "attribute3", column = "attribute3"),
@Result(property = "attribute4", column = "attribute4"),
@Result(property = "attribute5", column = "attribute5"),
@Result(property = "attribute6", column = "attribute6"),
@Result(property = "attribute7", column = "attribute7"),
@Result(property = "attribute8", column = "attribute8"),
@Result(property = "attribute9", column = "attribute9"),
@Result(property = "attribute10", column = "attribute10"),
})
public List<SysRole> select();
@Insert("<script>" +
"INSERT INTO sys_role(id,role_name,role_code,description,create_by,create_time,update_by,update_time,status,attribute_category,attribute1,attribute2,attribute3,attribute4,attribute5,attribute6,attribute7,attribute8,attribute9,attribute10) VALUES" +
"<foreach collection='sysroles' item='item' index='index' separator=','>" +
"(#{item.id},#{item.roleName},#{item.roleCode},#{item.description},#{item.createBy},#{item.createTime},#{item.updateBy},#{item.updateTime},#{item.status},#{item.attributeCategory},#{item.attribute1},#{item.attribute2},#{item.attribute3},#{item.attribute4},#{item.attribute5},#{item.attribute6},#{item.attribute7},#{item.attribute8},#{item.attribute9},#{item.attribute10})" +
"</foreach>" +
"</script>")
Integer insertBatch(@Param("sysroles") List<SysRole> SysRoleList);
@Insert(
"INSERT INTO sys_role(id,role_name,role_code,description,create_by,create_time,update_by,update_time,status,attribute_category,attribute1,attribute2,attribute3,attribute4,attribute5,attribute6,attribute7,attribute8,attribute9,attribute10) VALUES" +
"(#{id},#{roleName},#{roleCode},#{description},#{createBy},#{createTime},#{updateBy},#{updateTime},#{status},#{attributeCategory},#{attribute1},#{attribute2},#{attribute3},#{attribute4},#{attribute5},#{attribute6},#{attribute7},#{attribute8},#{attribute9},#{attribute10})"
)
Integer insert(SysRole SysRole);
}
\ No newline at end of file
...@@ -43,4 +43,6 @@ public interface SysUserRoleMapper{ ...@@ -43,4 +43,6 @@ public interface SysUserRoleMapper{
"WHERE role_code = #{roleCode} AND user_id = #{userId} AND ((#{now} > start_date AND end_date IS NULL) OR (#{now} BETWEEN start_date AND end_date))") "WHERE role_code = #{roleCode} AND user_id = #{userId} AND ((#{now} > start_date AND end_date IS NULL) OR (#{now} BETWEEN start_date AND end_date))")
@ResultMap("sysuserrole") @ResultMap("sysuserrole")
List<SysUserRole> selectRoleByRoleCode(@Param("roleCode")String roleCode, @Param("userId")String userId, @Param("now")LocalDateTime now); List<SysUserRole> selectRoleByRoleCode(@Param("roleCode")String roleCode, @Param("userId")String userId, @Param("now")LocalDateTime now);
} }
\ No newline at end of file
...@@ -66,7 +66,7 @@ Integer insert(TempItemFomPmp TempItemFomPmp); ...@@ -66,7 +66,7 @@ Integer insert(TempItemFomPmp TempItemFomPmp);
@Select("select count(temp_item_fom_pmp.`id`) from temp_item_fom_pmp") @Select("select count(temp_item_fom_pmp.`id`) from temp_item_fom_pmp")
Integer findCount(); Integer findCount();
@Select("SELECT * FROM temp_item_fom_pmp LIMIT ${sta},5000") @Select("SELECT * FROM temp_item_fom_pmp LIMIT ${sta},1000")
@ResultMap("tempitemfompmp") @ResultMap("tempitemfompmp")
public List<TempItemFomPmp> findLimit(@Param("sta") int sta); public List<TempItemFomPmp> findLimit(@Param("sta") int sta);
......
package orthopedics.model;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.List;
import com.alibaba.fastjson.annotation.JSONField;
/**
*
* @author author
*/
public class InvAccess implements Serializable {
private static final long serialVersionUID = 1572515923207L;
/**
* 主键
* 主键
* isNullAble:0
*/
@JSONField(name = "id")
private String id;
/**
* 创建人
* isNullAble:1
*/
@JSONField(name = "create_by")
private String createBy;
/**
* 创建日期
* isNullAble:1
*/
@JSONField(name = "create_time")
private java.time.LocalDateTime createTime;
/**
* 最后更新人
* isNullAble:1
*/
@JSONField(name = "update_by")
private String updateBy;
/**
* 最后更新日期
* isNullAble:1
*/
@JSONField(name = "update_time")
private java.time.LocalDateTime updateTime;
/**
* 备用字段分类
* isNullAble:1
*/
@JSONField(name = "attribute_category")
private String attributeCategory;
/**
* 备用字段1
* isNullAble:1
*/
@JSONField(name = "attribute1")
private String attribute1;
/**
* 备用字段2
* isNullAble:1
*/
@JSONField(name = "attribute2")
private String attribute2;
/**
* 备用子段3
* isNullAble:1
*/
@JSONField(name = "attribute3")
private String attribute3;
/**
* 备用字段4
* isNullAble:1
*/
@JSONField(name = "attribute4")
private String attribute4;
/**
* 备用字段5
* isNullAble:1
*/
@JSONField(name = "attribute5")
private String attribute5;
/**
* 备用字段6
* isNullAble:1
*/
@JSONField(name = "attribute6")
private String attribute6;
/**
* 备用字段7
* isNullAble:1
*/
@JSONField(name = "attribute7")
private String attribute7;
/**
* 备用字段8
* isNullAble:1
*/
@JSONField(name = "attribute8")
private String attribute8;
/**
* 备用字段9
* isNullAble:1
*/
@JSONField(name = "attribute9")
private String attribute9;
/**
* 备用字段10
* isNullAble:1
*/
@JSONField(name = "attribute10")
private String attribute10;
/**
* 用户
* isNullAble:0
*/
@JSONField(name = "user_id")
private String userId;
/**
* 库存
* isNullAble:0
*/
@JSONField(name = "inv_id")
private String invId;
/**
* 允许事务处理
* isNullAble:0,defaultVal:N
*/
@JSONField(name = "tx_allowed")
private String txAllowed;
/**
* 允许操作仓库
* isNullAble:0,defaultVal:N
*/
@JSONField(name = "entry_allowed")
private String entryAllowed;
/**
* 开始日期
* isNullAble:0
*/
@JSONField(name = "start_date")
private java.time.LocalDateTime startDate;
/**
* 结束日期
* isNullAble:1
*/
@JSONField(name = "end_date")
private java.time.LocalDateTime endDate;
public void setId(String id){this.id = id;}
public String getId(){return this.id;}
public void setCreateBy(String createBy){this.createBy = createBy;}
public String getCreateBy(){return this.createBy;}
public void setCreateTime(java.time.LocalDateTime createTime){this.createTime = createTime;}
public java.time.LocalDateTime getCreateTime(){return this.createTime;}
public void setUpdateBy(String updateBy){this.updateBy = updateBy;}
public String getUpdateBy(){return this.updateBy;}
public void setUpdateTime(java.time.LocalDateTime updateTime){this.updateTime = updateTime;}
public java.time.LocalDateTime getUpdateTime(){return this.updateTime;}
public void setAttributeCategory(String attributeCategory){this.attributeCategory = attributeCategory;}
public String getAttributeCategory(){return this.attributeCategory;}
public void setAttribute1(String attribute1){this.attribute1 = attribute1;}
public String getAttribute1(){return this.attribute1;}
public void setAttribute2(String attribute2){this.attribute2 = attribute2;}
public String getAttribute2(){return this.attribute2;}
public void setAttribute3(String attribute3){this.attribute3 = attribute3;}
public String getAttribute3(){return this.attribute3;}
public void setAttribute4(String attribute4){this.attribute4 = attribute4;}
public String getAttribute4(){return this.attribute4;}
public void setAttribute5(String attribute5){this.attribute5 = attribute5;}
public String getAttribute5(){return this.attribute5;}
public void setAttribute6(String attribute6){this.attribute6 = attribute6;}
public String getAttribute6(){return this.attribute6;}
public void setAttribute7(String attribute7){this.attribute7 = attribute7;}
public String getAttribute7(){return this.attribute7;}
public void setAttribute8(String attribute8){this.attribute8 = attribute8;}
public String getAttribute8(){return this.attribute8;}
public void setAttribute9(String attribute9){this.attribute9 = attribute9;}
public String getAttribute9(){return this.attribute9;}
public void setAttribute10(String attribute10){this.attribute10 = attribute10;}
public String getAttribute10(){return this.attribute10;}
public void setUserId(String userId){this.userId = userId;}
public String getUserId(){return this.userId;}
public void setInvId(String invId){this.invId = invId;}
public String getInvId(){return this.invId;}
public void setTxAllowed(String txAllowed){this.txAllowed = txAllowed;}
public String getTxAllowed(){return this.txAllowed;}
public void setEntryAllowed(String entryAllowed){this.entryAllowed = entryAllowed;}
public String getEntryAllowed(){return this.entryAllowed;}
public void setStartDate(java.time.LocalDateTime startDate){this.startDate = startDate;}
public java.time.LocalDateTime getStartDate(){return this.startDate;}
public void setEndDate(java.time.LocalDateTime endDate){this.endDate = endDate;}
public java.time.LocalDateTime getEndDate(){return this.endDate;}
@Override
public String toString() {
return "InvAccess{" +
"id='" + id + '\'' +
"createBy='" + createBy + '\'' +
"createTime='" + createTime + '\'' +
"updateBy='" + updateBy + '\'' +
"updateTime='" + updateTime + '\'' +
"attributeCategory='" + attributeCategory + '\'' +
"attribute1='" + attribute1 + '\'' +
"attribute2='" + attribute2 + '\'' +
"attribute3='" + attribute3 + '\'' +
"attribute4='" + attribute4 + '\'' +
"attribute5='" + attribute5 + '\'' +
"attribute6='" + attribute6 + '\'' +
"attribute7='" + attribute7 + '\'' +
"attribute8='" + attribute8 + '\'' +
"attribute9='" + attribute9 + '\'' +
"attribute10='" + attribute10 + '\'' +
"userId='" + userId + '\'' +
"invId='" + invId + '\'' +
"txAllowed='" + txAllowed + '\'' +
"entryAllowed='" + entryAllowed + '\'' +
"startDate='" + startDate + '\'' +
"endDate='" + endDate + '\'' +
'}';
}
}
package orthopedics.model;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.List;
import com.alibaba.fastjson.annotation.JSONField;
/**
*
* @author author
*/
public class SysRole implements Serializable {
private static final long serialVersionUID = 1572591308684L;
/**
* 主键
* 主键id
* isNullAble:0
*/
@JSONField(name = "id")
private String id;
/**
* 角色名称
* isNullAble:1
*/
@JSONField(name = "role_name")
private String roleName;
/**
* 角色编码
* isNullAble:0
*/
@JSONField(name = "role_code")
private String roleCode;
/**
* 描述
* isNullAble:1
*/
@JSONField(name = "description")
private String description;
/**
* 创建人
* isNullAble:1
*/
@JSONField(name = "create_by")
private String createBy;
/**
* 创建时间
* isNullAble:1
*/
@JSONField(name = "create_time")
private java.time.LocalDateTime createTime;
/**
* 更新人
* isNullAble:1
*/
@JSONField(name = "update_by")
private String updateBy;
/**
* 更新时间
* isNullAble:1
*/
@JSONField(name = "update_time")
private java.time.LocalDateTime updateTime;
/**
* 状态
* isNullAble:1
*/
@JSONField(name = "status")
private String status;
/**
* 备用字段分类
* isNullAble:1
*/
@JSONField(name = "attribute_category")
private String attributeCategory;
/**
* 备用字段1
* isNullAble:1
*/
@JSONField(name = "attribute1")
private String attribute1;
/**
* 备用字段2
* isNullAble:1
*/
@JSONField(name = "attribute2")
private String attribute2;
/**
* 备用子段3
* isNullAble:1
*/
@JSONField(name = "attribute3")
private String attribute3;
/**
* 备用字段4
* isNullAble:1
*/
@JSONField(name = "attribute4")
private String attribute4;
/**
* 备用字段5
* isNullAble:1
*/
@JSONField(name = "attribute5")
private String attribute5;
/**
* 备用字段6
* isNullAble:1
*/
@JSONField(name = "attribute6")
private String attribute6;
/**
* 备用字段7
* isNullAble:1
*/
@JSONField(name = "attribute7")
private String attribute7;
/**
* 备用字段8
* isNullAble:1
*/
@JSONField(name = "attribute8")
private String attribute8;
/**
* 备用字段9
* isNullAble:1
*/
@JSONField(name = "attribute9")
private String attribute9;
/**
* 备用字段10
* isNullAble:1
*/
@JSONField(name = "attribute10")
private String attribute10;
public void setId(String id){this.id = id;}
public String getId(){return this.id;}
public void setRoleName(String roleName){this.roleName = roleName;}
public String getRoleName(){return this.roleName;}
public void setRoleCode(String roleCode){this.roleCode = roleCode;}
public String getRoleCode(){return this.roleCode;}
public void setDescription(String description){this.description = description;}
public String getDescription(){return this.description;}
public void setCreateBy(String createBy){this.createBy = createBy;}
public String getCreateBy(){return this.createBy;}
public void setCreateTime(java.time.LocalDateTime createTime){this.createTime = createTime;}
public java.time.LocalDateTime getCreateTime(){return this.createTime;}
public void setUpdateBy(String updateBy){this.updateBy = updateBy;}
public String getUpdateBy(){return this.updateBy;}
public void setUpdateTime(java.time.LocalDateTime updateTime){this.updateTime = updateTime;}
public java.time.LocalDateTime getUpdateTime(){return this.updateTime;}
public void setStatus(String status){this.status = status;}
public String getStatus(){return this.status;}
public void setAttributeCategory(String attributeCategory){this.attributeCategory = attributeCategory;}
public String getAttributeCategory(){return this.attributeCategory;}
public void setAttribute1(String attribute1){this.attribute1 = attribute1;}
public String getAttribute1(){return this.attribute1;}
public void setAttribute2(String attribute2){this.attribute2 = attribute2;}
public String getAttribute2(){return this.attribute2;}
public void setAttribute3(String attribute3){this.attribute3 = attribute3;}
public String getAttribute3(){return this.attribute3;}
public void setAttribute4(String attribute4){this.attribute4 = attribute4;}
public String getAttribute4(){return this.attribute4;}
public void setAttribute5(String attribute5){this.attribute5 = attribute5;}
public String getAttribute5(){return this.attribute5;}
public void setAttribute6(String attribute6){this.attribute6 = attribute6;}
public String getAttribute6(){return this.attribute6;}
public void setAttribute7(String attribute7){this.attribute7 = attribute7;}
public String getAttribute7(){return this.attribute7;}
public void setAttribute8(String attribute8){this.attribute8 = attribute8;}
public String getAttribute8(){return this.attribute8;}
public void setAttribute9(String attribute9){this.attribute9 = attribute9;}
public String getAttribute9(){return this.attribute9;}
public void setAttribute10(String attribute10){this.attribute10 = attribute10;}
public String getAttribute10(){return this.attribute10;}
@Override
public String toString() {
return "SysRole{" +
"id='" + id + '\'' +
"roleName='" + roleName + '\'' +
"roleCode='" + roleCode + '\'' +
"description='" + description + '\'' +
"createBy='" + createBy + '\'' +
"createTime='" + createTime + '\'' +
"updateBy='" + updateBy + '\'' +
"updateTime='" + updateTime + '\'' +
"status='" + status + '\'' +
"attributeCategory='" + attributeCategory + '\'' +
"attribute1='" + attribute1 + '\'' +
"attribute2='" + attribute2 + '\'' +
"attribute3='" + attribute3 + '\'' +
"attribute4='" + attribute4 + '\'' +
"attribute5='" + attribute5 + '\'' +
"attribute6='" + attribute6 + '\'' +
"attribute7='" + attribute7 + '\'' +
"attribute8='" + attribute8 + '\'' +
"attribute9='" + attribute9 + '\'' +
"attribute10='" + attribute10 + '\'' +
'}';
}
}
...@@ -90,6 +90,10 @@ public class PurchaseServer { ...@@ -90,6 +90,10 @@ public class PurchaseServer {
return rcvReceiptHeaderVMapper.selectByUserAndStatus(userName, rcvHeaderStatus); return rcvReceiptHeaderVMapper.selectByUserAndStatus(userName, rcvHeaderStatus);
} }
public List<RcvReceiptHeaderV> selectRcvReceiptHeaderVByUserNameAndStatusG(String rcvHeaderStatus) {
return rcvReceiptHeaderVMapper.selectByUserAndStatusG(rcvHeaderStatus);
}
public List<RcvReceiptHeaderV> selectRcvReceiptHeaderVByInvIdAndStatus(List<String> invIds, String purHeaderStatus) { public List<RcvReceiptHeaderV> selectRcvReceiptHeaderVByInvIdAndStatus(List<String> invIds, String purHeaderStatus) {
return rcvReceiptHeaderVMapper.selectByInvIdAndStatus(invIds, purHeaderStatus); return rcvReceiptHeaderVMapper.selectByInvIdAndStatus(invIds, purHeaderStatus);
} }
...@@ -98,6 +102,10 @@ public class PurchaseServer { ...@@ -98,6 +102,10 @@ public class PurchaseServer {
return rcvReceiptHeaderVMapper.selectByUserAndStatusRange(userName, statusFrom, statusTo); return rcvReceiptHeaderVMapper.selectByUserAndStatusRange(userName, statusFrom, statusTo);
} }
public List<RcvReceiptHeaderV> selectRcvReceiptHeaderVByUserNameInStatusRangeG(String statusFrom, String statusTo) {
return rcvReceiptHeaderVMapper.selectByUserAndStatusRangeG(statusFrom, statusTo);
}
public List<RcvReceiptHeaderV> selectRcvReceiptHeaderVByInvIdInStatusRange(List<String> invIds, String statusFrom, String statusTo) { public List<RcvReceiptHeaderV> selectRcvReceiptHeaderVByInvIdInStatusRange(List<String> invIds, String statusFrom, String statusTo) {
return rcvReceiptHeaderVMapper.selectByInvIdAndStatusRange(invIds, statusFrom, statusTo); return rcvReceiptHeaderVMapper.selectByInvIdAndStatusRange(invIds, statusFrom, statusTo);
} }
......
...@@ -12,9 +12,9 @@ spring.messages.encoding=UTF-8 ...@@ -12,9 +12,9 @@ spring.messages.encoding=UTF-8
spring.datasource.driverClassName = com.mysql.jdbc.Driver spring.datasource.driverClassName = com.mysql.jdbc.Driver
#书城测试服务器 #书城测试服务器
spring.datasource.url = jdbc:mysql://116.62.111.56:3306/bookcity?useUnicode=true&characterEncoding=utf-8&useSSL=false&allowMultiQueries=true #spring.datasource.url = jdbc:mysql://116.62.111.56:3306/bookcity?useUnicode=true&characterEncoding=utf-8&useSSL=false&allowMultiQueries=true
#书城正式服务器 #书城正式服务器
#spring.datasource.url = jdbc:mysql://10.200.5.45:3306/bookcity?useUnicode=true&characterEncoding=utf-8&useSSL=false&allowMultiQueries=true spring.datasource.url = jdbc:mysql://127.0.0.1:3306/bookcity?useUnicode=true&characterEncoding=utf-8&useSSL=false&allowMultiQueries=true
spring.datasource.username = root spring.datasource.username = root
spring.datasource.password = 123456 spring.datasource.password = 123456
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment